The management server could not be deleted because it is hosting the RMS Emulator role. At the Operations Manager Shell prompt, ...

The management server could not be deleted because it is hosting the RMS Emulator role. At the Operations Manager Shell prompt, use the Set-SCOMRMSEmulator cmdlet to host the RMS Emulator role on a different management server, and then try again