ThinWorld Citrix Knowledgebase

Monday, 21 September 2009

Find Server Location in Farm MFCOM VBS Script

This script searches the Farm for a given server name and outputs its Location with the AMC console. This can be a handy script to quickly find the silo name of problem server and saves performing the search in the CMC.

strMessage = " Identify a Citrix Server"
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Exec("MFREG.exe Servername")
srch_Server = UCase(InputBox(strMessage, "Enter Server to Check "))
Set farm=CreateObject("MetaframeCOM.MetaframeFarm")
farm.initialize 1

for each server in farm.servers
if server.ServerName = Srch_Server then
wscript.echo Server.serverName & " - " & Server.IPAddress & " - " & Server.ParentFolderDN
wscript.quit
end if
Next
wscript.echo "Server Not Found"
Wscript.Quit

Labels:

0 Comments:

Post a Comment



<< Home