During the upgrade of System Center Operations Manager 2007 R2 to version 2012 I had to check my custom management packs. I have one management pack which sets agent based maintenance mode – I will blog about it in a separated blog. This management pack has a rule which runs on a windows computer to check for an event, then it starts a write action with a PowerShell script on the management server. In 2007 R2 it had to be the root management server. With 2012 we now have the RMS emulator role, so I thought it works like it should be.
Here you can see, what was used:
<WriteAction ID = “WA” TypeID=”xxx” Target: SC!Microsoft.SystemCenter.RootManagementServer>
Referenced Management Pack:
The PowerShell script also used SCOM 2007 R2 cmdlets.
The strange reaction in 2012 was, that the write action only ran successfully if the agent was assigned to the server which also was the RMS emulator. So it looked like that: the write action was started on the management server where the agent was assigned to and if that was not the RMS emulator a warning event (“The Root Connector has received bad packets which have been dropped”) was created in the Operations Manager event log and the script execution was cancelled.
How to solve that?
First I got the great tipp from Kevin Holman (Thanks so much!) to use another class. So I changed the target to SC!Microsoft.SystemCenter.ManagementServer.
But that did not solve the problem completely.
The next step was to change the PowerShell script write action to use SCOM 2012 cmdlets (Thanks Thomas Peter from VAS to help me change our script!).
Now it works!
See also Cameron Fullers blog about the RMS Emulator role: http://www.systemcentercentral.com/BlogDetails/tabid/143/IndexID/91085/Default.aspx