TechNet
Table of contents
TOC
Collapse the table of content
Expand the table of content

How to Process All Dimensions in the Data Warehouse Using Windows PowerShell Cmdlets

Bill Anderson|Last Updated: 8/15/2016

Applies To: System Center 2016 Technical Preview - Service Manager

You can process all the dimensions in the data warehouse in one operation using Windows PowerShell cmdlets, instead of processing each dimension individually. On the server that hosts SQL Server Analysis Services (SSAS), use the following Windows PowerShell script. Be sure to specify the fully qualified server name. You can type each command separately, or you can save them all as a Windows PowerShell script (.ps1) file and then run the script.

Before you can use Service Manager cmdlets, you need to configure the Service Manager Shell. For information about configuring the Service Manager Shell, see Configuring and Using the System Center 2016 - Service Manager Cmdlets for Windows PowerShell.

To process all dimensions using cmdlets

  1. Copy and paste the following code snippets at the prompt in a Service Manager Shell:

    1. [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.AnalysisServices") > $NULL
      
    2. $Server = New-Object Microsoft.AnalysisServices.Server
      $Server.Connect("<FullyQualifiedServerName>")
      $Databases = $Server.Databases
      $DWASDB = $Databases["DWASDataBase"]
      $Dimensions = New-Object Microsoft.AnalysisServices.Dimension
      $Dimensions = $DWASDB.Dimensions
      
    3. foreach ($Dimension in $Dimensions){$Dimension.Process("ProcessFull")}
      
© 2016 Microsoft