This script has pretty much already been covered in my previous post about Changing or Replacing an Operations Manager Gateway Server.
This time I’ve basically put parameter support in it to make it easier to use.
Here’s the script anyway.
To use it, create a textfile called ChangeGW.ps1 and paste the code into it. Save the file somewhere neat (maybe C:Scripts) for easy access. If you don’t feel like copy/pasting, you can download the script here.
To use it, open the Operations Manager Command Shell and type:
C:\ScriptsChangeGW.ps1 <old.gatewayserver.dns.name> <new.gatewayserver.dns.name>
C:\ScriptsChangeGW.ps1 gwserver01.domainname.local gwserver02.domainname.local