SCCM 2007 Machine Policy Retrieval & Evaluation Cycle VBScript

When you make any changes to your SCCM 2007 environment, the clients will polling for this changes by a interval. Default this is 60 minutes. If you want to force an Machine Policy Retrieval, you can use to following two options:

1.) Open your control panel
2.) Configuration Manager
3.) Action tab
4.) Machine Policy Retrieval & Evaluation Cycle
5.) Initiate Action

The next option is to use the following script.
———————————————————————————————
on error resume next

dim oCPAppletMgr ‘Control Applet manager object.
dim oClientAction ‘Individual client action.
dim oClientActions ‘A collection of client actions.

‘Get the Control Panel manager object.
set  oCPAppletMgr=CreateObject("CPApplet.CPAppletMgr")
if err.number <> 0 then
    Wscript.echo "Couldn’t create control panel application manager"
    WScript.Quit
end if

‘Get a collection of actions.
set oClientActions=oCPAppletMgr.GetClientActions
if err.number<>0 then
    wscript.echo "Couldn’t get the client actions"
    set oCPAppletMgr=nothing
    WScript.Quit
end if

‘Display each client action name and perform it.
For Each oClientAction In oClientActions

    if oClientAction.Name = "Request & Evaluate Machine Policy" then
        wscript.echo "Performing action " + oClientAction.Name
        oClientAction.PerformAction
    end if
next

set oClientActions=nothing
set oCPAppletMgr=nothing
———————————————————————————————

13 Responses to “SCCM 2007 Machine Policy Retrieval & Evaluation Cycle VBScript”

  1. Cool website, thanks for sharing the info!!

  2. cedar wood says:

    I never in a million years would’ve thought to look at things this way. This should make my morning a bunch easier.

  3. Thank you so much for putting this online.

  4. Hello – I must say, I’m impressed with your site. I had no trouble navigating through all the tabs and information was very easy to access. I found what I wanted in no time at all. Pretty awesome. Would appreciate it if you add forums or something, it would be a perfect way for your clients to interact. Great job

  5. Hmmm…very good to find out, there had been with no a doubt various items that I had not thought of before.

  6. gadget says:

    gives use a fantastic site decent Gives gives thanks for the efforts to guide myself

  7. This site is often a walk-through for all the data you wanted about this and didn’t know who to ask. Appear here, and you will genuinely find it.

  8. This could be the initial time I have commented here and I should say you give genuine, and quality data for bloggers! Great job.

  9. Nice site and great text.

  10. ABHAY says:

    your site is loading really slow

  11. Boswell says:

    Myarticlenetwork is not cost-free except govt is constrained. There is certainly a specific trigger and impression correct the following that might certainly be a well put together and expected for a law of physics: As government expands, liberty contracts. -Ronald Regan

  12. Branka says:

    I anticipation Ron Paul surpasses Obama in 2012 so we might have respectable change.

  13. hey there, this might be little offtopic, but i am hosting my site on hostgator and they will suspend my hosting in 4days, so i would like to ask you which hosting do you use or recommend?

Leave a Reply