Hey there,
You can change the connection to your CMS server in the top function:
function GetServers
{
$ServerInstance = "vypdbmon01"
$Database = "msdb"
This is where you would put your details in.
I am currently working on the same script to actually query Active Directory and to search through ALL Server, whether they have SQL or not and to document the environment.
I will post the updated script shortly.
Let me know if you need any help