Useful PowerShell Commands for Operations Manager 2007 and System Center 2012 – Operations Manager

Useful PowerShell Commands for Operations Manager 2007 and System Center 2012 - Operations Manager

Last update on 10-05-2012

 

 

Get list Operations Manager Commandson 29-02-2012

 

Get-OperationsManagerCommand 

 

 

Get list of unavailable/unresponsive agents updated on 21-03-2013

 

Operations Manager 2007:

Get-Monitoringclass -name "Microsoft.Windows.Computer" | Get-MonitoringObject | Where-Object {$_.IsAvailable -eq $False} | Select-Object DisplayName, IsAvailable | Format-Table -autosize

 

System Center 2012 – Operations Manager

Get-SCOMClass -name "Microsoft.Windows.Computer" | Get-SCOMClassInstance | Where-Object {$_.IsAvailable -eq $False} | Select-Object DisplayName, IsAvailable | Format-Table -autosize

 

 

Resolve the healthserviceid to Agent Name on 28-02-2012

 

Get-Agent | Where-Object {$_.hostedHealthService.id -eq "healthserviceid"} | Select-Object name

 

 

Export All Unsealed Management Packs on 28-02-2012

 

Operations Manager 2007:

md C:\UnsealedMPBackup
Get-ManagementPack | where {$_.Sealed -eq $false} | Export-Managementpack -path C:\UnsealedMPBackup

 

 

System Center 2012 – Operations Manager

 

md C:\UnsealedMPBackup
Get-SCOMManagementPack | where {$_.Sealed -eq $false} | Export-SCOMManagementpack -path C:\UnsealedMPBackup

 

 

Get the Management Server information including the Management Server Action Account identity on 29-02-2012

 

Get-ManagementServer | Select-Object DisplayName, IsRootManagementServer, ActionAccountIdentity, HealthState | Format-Table -autosize
 

 

Get the User Roles and its Members on 14-03-2012

 

Get-Userrole | Select-Object DisplayName, Users 

 

 

Get the Notification Subsrciption Name by resolve the SubscriptionID that appear on the buttom of the Notification Email Alerts on 10-05-2012

 

Get-NotificationSubscription | where-object {$_.ID -eq 'SubscriptionID'} | Select-Object DisplayName