OpsMgr 2012: Managing the RMS Emulator role in PowerShell (and why you might want to)

Here’s a question that came up in a panel discussion recently. Three new cmdlets included with OpsMgr 2012 manage the RMS emulator role. The first server installed in the management group holds this role by default. The role can be moved around as needed and be managed by these new cmdlets. In this article we’ll talk about using these cmdlets to:

  • Identify the RMS Emulator Role Holder
  • Move the RMS Emulator Role
  • Remove the RMS Emulator Role

We’ll also consider the question: “Why would I want to remove the RMS Emulator?”

Here are the three cmdlets provided for managing the RMS Emulator:

  • Get-SCOMRMSEmulator – Gets the management server hosting the RMS emulator role.
  • Remove-SCOMRMSEmulator – Removes the RMS emulator role.
  • Set-SCOMRMSEmulator – Moves RMS emulator role to the specified management server.

Identifying the RMS Emulator Role Holder

The Get-SCOMRMSEmulator cmdlet shows the management server currently hosting the RMS emulator role (RMSE). If running locally from a management server, you can run this without options to fetch data about the management group to which the PowerShell console is connected. When you run this cmdlet from a remote management workstation, you can specify a management server with which to establish a connection, as well as specify alternate credentials to determine the management group’s current RMSE.

Moving the RMS Emulator Role

The Set-SCOMRMSEmulator cmdlet moves the RMSE to a specified management server. First assign the new RMSE management server to a variable using the Get-SCOMManagementServer cmdlet, then run Set-SCOMRMSEmulator to the variable.
This example moves the role to server1.contoso.com.

Get-SCOMManagementServer -Name “server1.contoso.com” | Set-SCOMRMSEmulator -verbose

This is not something you would do very often, but if you needed to do some work on a management server, you might decide to make a clean transition of the role before decommissioning or performing maintenance on the server hosting the RMSE role.

Removing the RMS Emulator Role

Maybe the first question you ask is “Why would I want to remove the RMS Emulator role?”

The RMS emulator is only for backwards compatibility to legacy management packs and is in no way required for the management group to function correctly. So in theory, if you are able to confirm no workflows target the legacy Root Management Server class (and ensure none would / could in the future), you could remove this role. The Remove-SCOMRMSEmulator cmdlet removes the RMS emulator role from the management group your OpsMgr Command Shell session is connected to when you run the cmdlet. Run the cmdlet with no options; it will prompt you to verify this action before it actually runs.

To verify the role was removed, rerun the Get-SCOMRMSEmulator cmdlet, and PowerShell should return nothing.

Additional System Center PowerShell Resources

You’ll find a growing number of System Center, Cloud and PowerShell resources here on SCC in the “Master Collection of System Center PowerShell” and elsewhere. Here are few related Operations Manager 2012 Command Shell articles you may find useful

[OpsMgr 2012] Which management pack did this alert come from? via PowerShell

[OpsMgr 2012]: Checking your management server agent load balancing with PowerShell

[OpsMgr 2012]: Exploring Classes and Discovered Instances from OpsMgr Command Shell

OpsMgr 2012: Update agent failover settings from a spreadsheet via PowerShell [sample script]

Cloning Notification Subscriptions in Operations Manager 2012 using PowerShell [sample script]

OpsMgr 2012: All my Java apps require manual discovery – where do I get BeanSpy and PowerShell install scripts?

OpsMgr 2012: Reset Unit Monitors in Bulk with PowerShell

OpsMgr 2012: Find Computers without the Active Directory Helper Object (OOMADS) with PowerShell

OpsMgr 2012: Disabling Rules and Monitors in Bulk in PowerShell

OpsMgr 2012: Group Maintenance Mode via PowerShell (the way it should be)

OpsMgr 2012: Running a Task in Bulk Using PowerShell

OpsMgr 2012 PowerShell: updated collection of one-liners

OpsMgr 2012: Automating Agent Discovery and Deployment with PowerShell [sample script]

OpsMgr 2012: Identifying Computers in Active Directory without an OpsMgr Agent Installed [sample script]

OpsMgr 2012 Quick Tip: Finding servers experiencing the most heartbeat failures with PowerShell

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.