HowTo: Reset Policy using WMI

2010-05-12
2013-05-23
  • Jelger Bokma
    Jelger Bokma
    2010-05-12

    LS,

    Can anybody tell me how to Reset the Policy of a SMS2003 advanced client.
    The button Reset Policy under Client Action works like a charm but i want to send this command to multiple clients at once

    Found this :
    Set smsClient = GetObject("winmgmts://HERPC16317/root/ccm:SMS_Client")
    smsClient.ResetPolicy(0)

    This does trigger sms but doesn't do the same thing as the SCCM Client Center
    Also tried to add this
    SmsClient.Schedules.PolicyCleanup(0)
    SmsClient.Schedules.ValidateAssignments(0)
    smsClient.Schedules.LSRefreshDefaultMP(0)
    smsClient.Schedules.ProxyMaintenanceEndpoint(0)
    smsClient.Schedules.LSRefreshLocations(0)
    smsClient.Schedules.SendUnsent(0)

    But without luck.

    Anybody????