Re: Displaying Resident MP



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




.



Relevant Pages

  • Re: Unable to view Reports - Orootnode error
    ... Kim Oppalfens - Sms Expert for lack of any other expertise ... Windows Server System MVP - SMS ...
    (microsoft.public.sms.admin)
  • Re: how to list ID for subcollections
    ... And in SMS console it doesn't show if a collection has a subcollection or not. ... While querying Collections I got all my collections including subcollections. ... Windows Server System MVP - SMS ...
    (microsoft.public.sms.admin)
  • Re: how to list ID for subcollections
    ... 1.we have many collectioned and subcollections nested. ... Is there a log I can ssearch on SMS side or on the ... Windows Server System MVP - SMS ...
    (microsoft.public.sms.admin)
  • Re: SMS console SP1 and Windows Vista Enterprise.
    ... Kim Oppalfens - Sms Expert for lack of any other expertise ... Windows Server System MVP - SMS ...
    (microsoft.public.sms.admin)
  • Re: how to list ID for subcollections
    ... 1.we have many collectioned and subcollections nested. ... Is there a log I can ssearch on SMS side or on the ... Windows Server System MVP - SMS ...
    (microsoft.public.sms.admin)

Loading