Re: Displaying Resident MP
- From: "Steve Thompson" <stevethompson@xxxxxxxxxxxxx>
- Date: Thu, 26 Apr 2007 09:20:01 -0400
Here is a script from the 'SMS 2003 Recipes' that will give you that...
' local computer, substitute remote computer name for "."
strComputerName = "."
Set objSMS = GetObject("winmgmts://" & strComputerName & _
"/root/ccm")
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
Next
<Kim Oppalfens [MVP]> wrote in message
news:F03BDE15-2836-4072-BDC3-2C01EEE6CC63@xxxxxxxxxxxxxxxx
Interesting.
Would it be possible to post the output for a typical roaming user?
--
"Everyone is an expert at something"
Kim Oppalfens - Sms Expert for lack of any other expertise
Windows Server System MVP - SMS
"Jason Steeves" <JasonSteeves@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:8A16E7CB-0714-4A42-BF15-F0287DB8DAE3@xxxxxxxxxxxxxxxx
thanks for the reply. I found what I was looking for. Here's the script
in
case anyone else is looking for it
----------------------------------------------------------------------------------
On Error Resume Next
Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20
Set objWMIService = GetObject("winmgmts:\\" & "." &
"\root\CCM\SoftMgmtAgent")
Set colItems = objWMIService.ExecQuery("SELECT * FROM
CCM_SourceUpdateHistory", "WQL", wbemFlagReturnImmediately +
wbemFlagForwardOnly)
For Each objItem In colItems
text = text & "LastAssignedMP: " & objItem.LastAssignedMP & vbcrlf
text = text & "LastLocalMP: " & objItem.LastLocalMP & vbcrlf
text = text & "LastProxyMP: " & objItem.LastProxyMP & vbcrlf
text = text & "LastRefreshCycle: " & objItem.LastRefreshCycle & vbcrlf
text = text & "LastSubnets: " & objItem.LastSubnets & vbcrlf
text = text & vbcrlf
Next
WScript.Echo text
----------------------------------------------------------------------------------
Jason Steeves.
"Kim Oppalfens [MVP]" wrote:
Connect to wmi
root\ccm namespace
sms_authority class
Currentmanagementpoint property.
And don't go and fiddle with the value, that is unsupported, for display
purposes only ;-)
--
"Everyone is an expert at something"
Kim Oppalfens - Sms Expert for lack of any other expertise
Windows Server System MVP - SMS
"Jason Steeves" <JasonSteeves@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message
news:9680D757-B1B0-4CF3-925E-B6F948E51CE7@xxxxxxxxxxxxxxxx
If I open the PolicySpy app it tells me what the Assigned/Resident MP
are.
How can I get this same information via a vbscript?
Thanks,
Jason
.
- References:
- Re: Displaying Resident MP
- From: Kim Oppalfens[MVP]
- Re: Displaying Resident MP
- From: Kim Oppalfens[MVP]
- Re: Displaying Resident MP
- Prev by Date: Re: MSI Install
- Next by Date: How?
- Previous by thread: Re: Displaying Resident MP
- Next by thread: Packages not getting created...
- Index(es):
Relevant Pages
|
Loading