Operations Manager 2007 and Powershell

In my previous post I showed how
to install Operations Manager 2007, in this post you
will get a first look at powershell in Operations Manager 2007. 

Like in the new version of Exchange 2007, Operations Manager 2007 also makes usage of powershell.

start with the beginning, open the MSH console, Powershell will open
and automatically connect to the Management server, in my case it was
SRVMOM01 (see the screenshot)

are not so many cmdlets (command in Powershell) available for
Operations Manager 2007 then for Exchange. I hope they will extend the
number of cmdlets as you already know now I am a BIG FAN of Powershell
(see my previous posts about Powershell :

But if you want to know which are the commands available for Operations Manager 2007 then just type get-momcommand


The first command you could try out is DIR when you do this in the default MSH console the this command will return the different groups there are available, for example “AllComputersGroup”


Lets connect to this group with the following command:
cd Microsoft.SystemCenter.AllComputersGroup
if you do a DIR now
you will have a list of computers which are managed by Operations
Manager 2007. I already installed the agents onto my two servers.


Let’s create a list of all resolved alerts we have:  get-alert | where { $_.ResolutionState -eq “Resolved”}

This will return a big lists with all information about the alerts. The second step here is narrow the returned information

We will use the same command but with additional parameters:
get-alert | where { $_.ResolutionState -eq “Resolved”} | format-list manage*, name, ResolutionState,monitoring*

This command will have the following output (example based on my environment):

You can do the same for all new alerts:
get-alert | where { $_.ResolutionState -eq “New”} | format-list manage*, name, ResolutionState, monitoring*

You can output the results to a file for later usage.


Another command is the resolve-alert command which will let you easily resolve alerts in bulk. Here is an example:

get-alert | where { $_.ResolutionState -eq “New”} | resolve-alert


think that powershell can be useful in Operation Manager but I would
like to see the Management console changed like in the Exchange console
where we show which command (and parameters) has been used to perform a
certain action.

It’s still Beta software so maybe it could change later on. I will post this request to the product team.