Listing SSAS cmdlets
This recipe lists the new SSAS cmdlets in SQL Server 2012.
How to do it...
Let's explore the code required to list the SSAS cmdlets.
Open the PowerShell console by going to Start | Accessories | Windows PowerShell | Windows PowerShell ISE.
Add the following script and run:
Get-Command -Module SQLASCmdlets
This should give a result similar to this:
How it works...
SQL Server Analysis Services (SSAS) gets some PowerShell love in SQL Server 2012. You can import the SQLASCMDLETS
module to start using the new cmdlets.
To list the new AS
cmdlets, simply use the Get-Command
as follows:
Get-Command -Module SQLASCMDLETS
You will notice that some of the common SSAS tasks have been wrapped in cmdlets, such as Backup-ASDatabase
, Restore-ASDatabase
, Invoke-ASCmd
, Invoke-ProcessCube
, and the like.
See also
The Listing SSAS instance properties recipe
Check out these MSDN articles related to:
Analysis Services PowerShell:
Analysis Services PowerShell...