Here's an example of displaying the current management point for an SMS Advanced Client:
strComputerName = "2kPro" '2kPro is the name of the computer to query
Set objSMS = GetObject("winmgmts://" & strComputerName & "/root/ccm") 'Connect to the Adv Client namespace
Set objAuthority = objSMS.ExecQuery("Select * from SMS_Authority")
For Each authority In objAuthority
wscript.echo "SMS Site: " & Replace(authority.Name, "SMS:", "")
wscript.echo "MP: " & authority.CurrentManagementPoint
Next
Set colProxyMPs = objSMS.ExecQuery("Select * from SMS_MPProxyInformation")
For Each objProxyMP in colProxyMPs
wscript.echo "Proxy MP: " & objProxyMP.Name 'Display the Proxy MP, if it exists
Next
Questions? Comments?:
send me emailSee all my
articles.