Analysis Services PowerShell Reference
Applies to: SQL Server Analysis Services Azure Analysis Services Fabric/Power BI Premium
SQL Server Analysis Services PowerShell cmdlets are included in the SqlServer module.
Note
Azure Analysis Services database operations use the same SqlServer module as SQL Server Analysis Services. However, not all cmdlets are supported for Azure Analysis Services. To learn more, see Manage Azure Analysis Services with PowerShell.
Analysis Services Cmdlets
SQL Server Analysis Services provides cmdlets correspond to methods in the Microsoft.AnalysisServices namespace. The following table describes each cmdlet and provides a link to the corresponding AMO method.
If you want to use PowerShell to perform a task that is not represented in the following list (for example to create or synchronize a database), you can write TMSL or XMLA script for that action, and then execute it using the Invoke-ASCmd cmdlet.
Cmdlet | Description | Equivalent AMO Methods |
---|---|---|
Add-RoleMember cmdlet | Add a member to a database role. | Add |
Backup-ASDatabase cmdlet | Backup an Analysis Services database. | Database.Backup |
Invoke-ASCmd cmdlet | Execute a query or script in XMLA or TSML (JSON) format. | Execute |
Invoke-ProcessASDatabase | Process a database. | Process |
Invoke-ProcessCube cmdlet | Process a cube. | Process |
Invoke-ProcessDimension cmdlet | Process a dimension. | Process |
Invoke-ProcessPartition cmdlet | Process a partition. | Process |
Invoke-ProcessTable cmdlet | Process a table in a Tabular model, compatibility model 1200 or higher. | Process |
Merge-Partition cmdlet | Merge a partition. | Merge |
New-RestoreFolder cmdlet | Create a folder to contain a database backup. | RestoreFolder |
New-RestoreLocation cmdlet | Specify one or more remote servers on which to restore the database. | RestoreLocation |
Remove-RoleMember cmdlet | Remove a member from a database role. | Remove |
Restore-ASDatabase cmdlet | Restore a database on a server instance. | Restore |