Displaying the Current Management Point and Proxy Management Point Using VBScript

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 email

See all my articles.
Published Thursday, October 12, 2006 1:37 AM by gramsey
Filed under: ,

Comments

No Comments
Powered by Community Server (Commercial Edition), by Telligent Systems