Accessing SSAS Instance Configuration Info via Powershell

Over the past few months I’ve been working on a lot of scripts for collecting SSAS-related configuration and performance information. So far, most of the scripting has been done via PowerShell (which I’m really starting to appreciate) but on a few rare occasions I’ve had to dip my toes into the ridiculously silly world of .NET … not enough to appreciate application developers (jk’ish) …but definitely enough to realize that the IDE for .NET developers is insanely better than anything I’ve seen/used for SQL/MDX/DAX/PowerShell developers.

Today’s post is just a quick (as the h@rdcor3 powershell devs would say) “PoSh” code-snippet for accessing SSAS instance configuration information via PowerShell.

$ssasInstanceName = "localhost"
$loadAssembly = [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.AnalysisServices")
$svr = New-Object Microsoft.AnalysisServices.Server


It’s rather useless in the form above but could easily be wrapped up into an enterprise-ready script for collecting and storing SSAS instance configuration information (as it should be for those who actually give a darn about having a well-documented environment).

That’s it – Happy Friday!


UPDATE 20151008: here’s an example where this snippet is being used in a more realistic scenario.

One reply on “Accessing SSAS Instance Configuration Info via Powershell”

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s