How to Process All Dimensions in the Data Warehouse Using Windows PowerShell Cmdlets
Updated: May 13, 2016
Applies To: System Center 2012 SP1 - Service Manager, System Center 2012 R2 Service Manager, System Center 2012 - 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 2012 - Service Manager Cmdlets for Windows PowerShell.
To process all dimensions using cmdlets
Copy and paste the following code snippets at the prompt in a Service Manager Shell:
-
[System.Reflection.Assembly]::LoadWithPartialName ("Microsoft.AnalysisServices") > $NULL
-
$Server = New-Object Microsoft.AnalysisServices.Server $Server.Connect("<FullyQualifiedServerName>") $Databases = $Server.Databases $DWASDB = $Databases["DWASDataBase"] $Dimensions = New-Object Microsoft.AnalysisServices.Dimension $Dimensions = $DWASDB.Dimensions
-
foreach ($Dimension in $Dimensions){$Dimension.Process("ProcessFull")}
-
See Also
Managing the Data Warehouse in System Center 2012 - Service Manager