Category Archives: Command Shell – Powershell Reference

Display Grey SCOM Agents Using Powershell

To display which agents are in grey state in SCOM use the powershell script below. ——————————————————————————- $rootMS =’RMSFQDN’ #Initializing the Ops Mgr 2007 Powershell provider add-pssnapin “Microsoft.EnterpriseManagement.OperationsManager.Client” -ErrorVariable errSnapin ; set-location “OperationsManagerMonitoring::” -ErrorVariable errSnapin ; new-managementGroupConnection -ConnectionString:$rootMS -ErrorVariable errSnapin ; … Continue reading

Posted in Command Shell - Powershell Reference | Leave a comment

Command Shell Output Group Members to File

Fire up Command Shell. Type ‘Dir’ grab the Path name of the group and type ‘cd <enter path name here> and press enter. You can then output to a text file. For Example dir : ft pathname > c:\Groupmember.txt will … Continue reading

Posted in Command Shell - Powershell Reference | Leave a comment

Get SCOM Agent Info using Powershell

get-agent | format-list -property, displayname, Domain, Version, Healthstate

Posted in Command Shell - Powershell Reference | Leave a comment

Bulk Agent Proxy Using Powershell

Run this from Powershell to Bulk Enable or Disable SCOM Agent Proxy Settings   $rootMS=”RMS.DEMO.DOMAIN” #——————————————————————————- # Add operations manager snapin and connect to the root management server. #——————————————————————————- add-pssnapin “Microsoft.EnterpriseManagement.OperationsManager.Client”; set-location “OperationsManagerMonitoring::”; new-managementGroupConnection -ConnectionString:$rootMS; ## set proxy enabled for … Continue reading

Posted in Command Shell - Powershell Reference | Leave a comment

Run Powershell Scripts without configuring RMS Name every time

I frequently run Powershell Scripts both as run once and as SCOM Command Based rules. For the Scheduled rules I store in a Un-Sealed MP and to sync the MP across multiple Management Groups, depending on size of your estate … Continue reading

Posted in Command Shell - Powershell Reference | 1 Comment