Thursday, March 31, 2011

VBscript - How to obtain the local SCCM Proxy Point from WMI

Say you have an application you need to run from a share on local SCCM site server, not from a specific DP.

In this case it can be really easy to determine what your local site server is by querying local WMI for the MPProxy Point.


strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\ccm")
Set colItems = objWMIService.ExecQuery( _
"SELECT * FROM SMS_MPProxyInformation",,48)
For Each objItem in colItems
Wscript.Echo "sitename: " & objItem.name
Next

No comments :

Post a Comment