We will list SSAS instance properties in this recipe.
Let's explore the code required to list SSAS instance properties.
Open the PowerShell console by going to Start | Accessories | Windows PowerShell | Windows PowerShell ISE.
Import the
SQLPS
module as follows:Import-Module SQLASCMDLETS -DisableNameChecking
Add the following script and run:
#Connect to your Analysis Services server $SSASServer = New-Object Microsoft.AnalysisServices.Server $instanceName = "KERRIGAN" $SSASServer.connect($instanceName) #get all properties $SSASServer | Select *
You should see a result similar to this:
To get SSAS instance properties, we first need to load the SQLASCMDLETS
module:
Import-Module SQLASCMDLETS -DisableNameChecking
We can then create an Analysis Server object and connect to our instance:
#Connect to your Analysis Services server $SSASServer = New-Object Microsoft.AnalysisServices.Server $instanceName = "KERRIGAN" $SSASServer.connect($instanceName...