使用 Operations Manager 殼層Using Operations Manager Shell

重要

已不再支援此版本的 Operations Manager,建議升級至 Operations Manager 2019This version of Operations Manager has reached the end of support, we recommend you to upgrade to Operations Manager 2019.

在 System Center Operations Manager 中,Operations Manager 殼層會隨著 Operations Manager 主控台一併安裝;它提供了命令列環境和工作型指令碼技術,可用來自動化許多 Operations Manager 管理工作。In System Center Operations Manager, the Operations Manager Shell is installed with the Operations Manager console; it provides a command-line environment and task-based scripting technology that you can use to automate many Operations Manager administrative tasks.

Operations Manager 殼層是建置在 Windows PowerShell 之上。The Operations Manager Shell is built on Windows PowerShell. Operations Manager 殼層透過一組額外的 "Cmdlet" 擴充了 Windows PowerShell 的功能;這些 Cmdlet可以直接從命令殼層提示字元執行,或是從批次檔呼叫。The Operations Manager Shell extends Windows PowerShell with an additional set of cmdlets, which can either be run directly from the command shell prompt or called from within a script. Cmdlet 可個別用於執行特定工作,也可以與其他 Cmdlet 結合以執行複雜的系統管理工作。Cmdlets can be used individually to perform a specific task, or they can be combined with other cmdlets to perform complex administrative tasks. 傳統命令列環境的運作方式與 Windows PowerShell 不同,傳統命令列會將文字結果傳回給使用者或是透過路由 (「經由管道」) 將文字傳送到不同的命令列公用程式,而 Windows PowerShell 則會直接操作 Microsoft .NET Framework 物件。Unlike traditional command-line environments that work by returning text results to the end user or routing ("piping") text to different command-line utilities, Windows PowerShell manipulates Microsoft .NET Framework objects directly. 這種方式提供了更完備也更有效率的系統互動機制。This provides a more robust and efficient mechanism for interacting with the system.

若要開啟 Operations Manager 殼層,請從 Windows [開始] 畫面,輸入 Operations Manager 並從搜尋結果中選取 [Operations Manager 殼層] 。To open the Operations Manager Shell, from the Windows start screen, type Operations Manager and select Operations Manager Shell from the search results. 您也可以在命令提示中輸入下列命令,將 Operations Manager 模組匯入現有的 Windows PowerShell 工作階段:You can also import the Operations Manager module into an existing Windows PowerShell session by typing the following at the command prompt:

Import-Module -Name OperationsManager  

您可以在 Operations Manager 殼層中輸入 Get-Help <Cmdlet 名稱> 以存取 Cmdlet 說明,或是檢視 System Center Operations Manager 中的 Cmdlet 線上說明。You can access cmdlet help in the Operations Manager Shell by typing Get-Help cmdlet name or view the help online at Cmdlets in System Center Operations Manager.

若要瞭解 Windows PowerShell 的詳細資訊,請參閱 Windows PowerShell 開始使用手冊To learn more about Windows PowerShell, see Windows PowerShell Getting Started Guide.

後續步驟Next steps