The Operations Manager Shell is a Windows PowerShell module that lets you access an Operations Manager management group. Cmdlets in the snap-in perform the same kinds of actions and access the same data as you do in the Operations console. Having these capabilities in Windows PowerShell lets you automate these actions at a command prompt and potentially achieve functionality that you cannot achieve in the Operations console.

For example, you could write a script to retrieve a list of computers from a database or text file and install an agent on them by using the Install-SCOMAgent cmdlet. Another example would be to retrieve alert details by using the Get-SCOMAlert cmdlet and then exporting the information to a spreadsheet for analysis.

You can install the Operations Manager Shell on any server or workstation that has the Operations console installed.

Management Group Connection

Just like the Operations console, the Operations Manager Shell runs on the local workstation but requires a connection to a management group. When it is started, it automatically makes a connection to a default management server as the workstation. You can optionally add a connection to another management server by using the New-SCOMManagementGroupConnection cmdlet.

The Operations Manager Shell is also subject to the same security as the Operations console. The functions that you can perform with the cmdlets are subject to the Operations Manager roles that you are a member of. For more information about user roles, see Implementing User Roles in the Operations Guide.

Procedures

To start the Operations Manager Shell

  1. On the Start menu, point to All Programs, point to System Center 2012, click Operations Manager, and then click Operations Manager Shell.

Windows PowerShell starts and loads the Operations Manager Shell snap-in. It connects to the default management server for the workstation. If the management server is unavailable, an error message appears.

To retrieve a list of Operations Manager cmdlets

  1. Start the Operations Manager Shell.

  2. Type Get-SCOMCommand, and then press Enter.

To get help for an Operations Manager cmdlet

  1. Start the Operations Manager Shell.

  2. For basic help, type Get-Help, followed by the name of the cmdlet, and then press Enter.

  3. For complete help including examples, type Get-Help, followed by the name of the cmdlet and –full, and then press Enter.

For example, to get complete help for the Set-SCOMMaintenanceMode cmdlet, use the following command: Get-Help Set-SCOMMaintenanceMode -full

For More Information

For more information and for samples of using the Operations Manager Shell, see Operations Manager Shell in the Operations Guide.