Listing SSAS instance properties
We will list SSAS instance properties in this recipe.
How to do it...
Let's explore the code required to list SSAS instance properties:
- Open PowerShell ISE as an administrator.
- Import the
SQLASCmdlets
module as follows:Import-Module SQLASCmdlets -DisableNameChecking
- Add the following script and run it:
#Connect to your Analysis Services server $SSASServer = New-Object Microsoft.AnalysisServices.Server $instanceName = "localhost" $SSASServer.connect($instanceName) #get all properties $SSASServer | Select-Object *
You will see a result similar to this:
How it works...
To get SSAS instance properties, we first need to load the SQLASCmdlets
module:
Import-Module SQLASCmdlets -DisableNameChecking
We then need to create an Analysis Server
object and connect to our instance:
#Connect to your Analysis Services server $SSASServer = New-Object Microsoft.AnalysisServices.Server $instanceName = "localhost" $SSASServer.connect($instanceName)
Once we...