Analysis Services PowerShell 參考

適用于:SQL Server Analysis Services Azure Analysis Services Fabric/Power BI Premium

SQL Server Analysis Services PowerShell Cmdlet 包含在SqlServer 模組中。

注意

Azure Analysis Services 資料庫作業會使用與 SQL Server Analysis Services 相同的 SqlServer 模組。 不過,Azure Analysis Services 並不支援所有的 Cmdlet。 若要深入了解,請參閱使用 PowerShell 管理 Azure Analysis Services

Analysis Services 指令程式

SQL Server Analysis Services提供 Cmdlet 對應至Microsoft.AnalysisServices命名空間中的方法。 下表描述每個指令程式,並提供對應 AMO 方法的連結。

如果您要使用 PowerShell 執行未在下列清單中表示的工作 (例如建立或同步處理資料庫),可以為該動作撰寫 TMSL 或 XMLA 指令碼,然後使用 Invoke-ASCmd Cmdlet 執行它。

Cmdlet Description 對等 AMO 方法
Add-RoleMember 指令程式 將成員新增到資料庫角色。 Add
Backup-ASDatabase 指令程式 備份 Analysis Services 資料庫。 Database.Backup
Invoke-ASCmd 指令程式 執行 XMLA 或 TSML (JSON) 格式的查詢或指令碼。 Execute
Invoke-ProcessASDatabase 處理資料庫。 Process
Invoke-ProcessCube 指令程式 處理 Cube。 Process
Invoke-ProcessDimension 指令程式 處理維度。 Process
Invoke-ProcessPartition 指令程式 處理資料分割。 Process
Invoke-ProcessTable Cmdlet 在表格式模型中處理資料表,相容性模型 1200 或更高版本。 Process
Merge-Partition 指令程式 合併資料分割。 Merge
New-RestoreFolder 指令程式 建立要包含資料庫備份的資料夾。 RestoreFolder
New-RestoreLocation 指令程式 指定一個或多個要還原資料庫的遠端伺服器。 RestoreLocation
Remove-RoleMember 指令程式 從資料庫角色移除成員。 Remove
Restore-ASDatabase 指令程式 在伺服器執行個體上還原資料庫。 Restore