Resources for IT Professionals > 論壇首頁 > Configuration Manager General > How to refresh Machine policy retrieval and evaluation cycle remotely
發問發問
 

已答覆How to refresh Machine policy retrieval and evaluation cycle remotely

  • Friday, 3 July, 2009 4:03Kedar S Tamboli 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    Hi All,

    I want to do automation using batch scripting.
    The process  - Click on "Machine policy retrieval and evaluation cycle" and 'Initiate Action' on client computer. I want to do it automatically using batch scripting.
    I want to know the exe file which is running on client that I can use for refreshing the cycle Or any other client agent.
    Or is there other way to do this? (not manually)

    Thanks,
    Kedar S Tamboli

解答

  • Friday, 3 July, 2009 4:40Kent Agerlund 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     已答覆
    Hi Kedar,

    If you install the right click tools you will get a VB script whit the code. The Right tools can be downloaded from - http://www.myitforum.com/myITWiki/SCCMTools.ashx



    Kent Agerlund | http://agerlund.spaces.live.com/blog/
  • Friday, 3 July, 2009 11:51Sherry KissingerMVP使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     已答覆

    If you're looking to get into scripting Configuration Manager, grab the SDK: http://www.microsoft.com/downloads/details.aspx?familyid=064a995f-ef13-4200-81ad-e3af6218edcc&displaylang=en

    The book "SMS 2003 Recipes" by Warren Byle and Greg Ramsey is for SMS2003, but all of the scripts inside still work on ConfigMgr07; so you might want to consider picking that up.

    There are a couple of different ways to invoke HW inv; trigger the scheduleid is the best way remotely.  But I've used this when the computer itself runs the vbscript (not a remotely invoked action).  You could use it for any action in the Control Panel applet; but be wary of the user policy refresh--that's specific the the user running the action.  So if you were to run it as you, it's user policy refresh for you, not the interactively logged in user.  If you need that action, there's a workaround (not easy, but it usually works).

    'Run a SMS Hardware Inventory
    Set cpApplet = CreateObject("CPAPPLET.CPAppletMgr")
    Set actions = cpApplet.GetClientActions
    For Each action In actions
        If Instr(action.Name,"Hardware Inventory") > 0 Then
            action.PerformAction   
    End if
    Next


    Standardize. Simplify. Automate.

所有回覆

  • Friday, 3 July, 2009 4:40Kent Agerlund 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     已答覆
    Hi Kedar,

    If you install the right click tools you will get a VB script whit the code. The Right tools can be downloaded from - http://www.myitforum.com/myITWiki/SCCMTools.ashx



    Kent Agerlund | http://agerlund.spaces.live.com/blog/
  • Friday, 3 July, 2009 11:51Sherry KissingerMVP使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     已答覆

    If you're looking to get into scripting Configuration Manager, grab the SDK: http://www.microsoft.com/downloads/details.aspx?familyid=064a995f-ef13-4200-81ad-e3af6218edcc&displaylang=en

    The book "SMS 2003 Recipes" by Warren Byle and Greg Ramsey is for SMS2003, but all of the scripts inside still work on ConfigMgr07; so you might want to consider picking that up.

    There are a couple of different ways to invoke HW inv; trigger the scheduleid is the best way remotely.  But I've used this when the computer itself runs the vbscript (not a remotely invoked action).  You could use it for any action in the Control Panel applet; but be wary of the user policy refresh--that's specific the the user running the action.  So if you were to run it as you, it's user policy refresh for you, not the interactively logged in user.  If you need that action, there's a workaround (not easy, but it usually works).

    'Run a SMS Hardware Inventory
    Set cpApplet = CreateObject("CPAPPLET.CPAppletMgr")
    Set actions = cpApplet.GetClientActions
    For Each action In actions
        If Instr(action.Name,"Hardware Inventory") > 0 Then
            action.PerformAction   
    End if
    Next


    Standardize. Simplify. Automate.