Adding SCOM monitoring objects(computers) to a specific groups using Power shell.
HI, I have a specific requirement in SCOM 2007 R2, I need to add computers to a group using Powershell. The reason is we have around 500 windows servers to be patched on a monthly basis for Microsoft patches which are released every month, this task is done batch wise, e.g. 50 servers on day 1, the another 50 on day 2 and so on. And during this patching activity we have to put the server in SCOM maintenance mode(MM) before restarting the server or else we get a SCOM alert when the server is restarted without MM. At present this task is very hectic to add each and every computer in MM from the SCOM console, also I have tried to add the computers in a group and scheduling the group in MM (using the SCOM Remote Maintenance mode Scheduler 2.0), this is not feasible as the patching or restarting time for any server is not fixed and it depends on the production and Application team approval, so I have to change the group members every time. I was thinking of a Power shell script or any other method where in I can provide a name of servers in a source file(.txt or .csv) and run the command which would add all the servers from the source file to the group and then I can schedule the group in MM. Just thinking if it’s feasible and if anyone has tried this ?
February 23rd, 2011 8:19am

Regarding how to add objects to a group, I would like to share the following with you for your reference: Creating and Updating Groups http://blogs.msdn.com/b/jakuboleksy/archive/2006/11/15/creating-and-updating-groups.aspx SCOM PowerShell Adding members to a group http://social.technet.microsoft.com/Forums/en-US/operationsmanagerextensibility/thread/7606aad0-fd9d-4cfe-8e1f-bb82bcbdeffd/ Powershell : How to add object in SCOM Group http://social.technet.microsoft.com/Forums/en-US/operationsmanagerextensibility/thread/ca194b5c-27bb-4904-8c89-1547a76cf875/ Hope this can give you some hints. Thanks. Nicholas Li - MSFT Please remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Free Windows Admin Tool Kit Click here and download it now
February 25th, 2011 3:39am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics