This is a relatively a short blog providing a general introduction to SQL Server Analysis Services Tabular Model management using Windows Powershell. You can discover and learn more about Powershell from here, here and here.
Since powershell is a scripting language, there are very useful scripts which already have been published which promise to do numerous tasks. It is also, relatively easy to write a new assembly (or Module) out of the box which can carry out the desired tasks.
In this post you will see the new cmdlet “TabularDatabaseCmdlet” which can be downloaded from codeplex by clicking here .
One of the very first that I did was to browse the assembly (TabularDatabaseCmdlet.dll). I used the MSIL disassembler IL DASM utility to discover the methods in this assembly.
Alternatively, you can also browse all the available methods in the module using powershell
I am using Windows Powershell v3.0 for this example
When you start a new session of powershell, you will have to load the module so as to access its cmdlets
This can be achieved using the Import-Module cmdlet which is used to add one or more modules to the current session
Using the Get-Module cmdlet, which lists the modules loaded in the current session, you can verify whether the module (TabualrDatabaseCmdlet) was loaded successfully or not.
Now using the Get-Command –Module TabularDatabaseCmdlet you can list all the cmdlets that are available in the afore mentioned module. Below is a snap shot of the result set returned.
This is it!! In the following post, we will dive into more details the exploring the cmdlet.