如何启动 Configuration Manager 客户端策略检索

应用到: System Center Configuration Manager 2007, System Center Configuration Manager 2007 R2, System Center Configuration Manager 2007 R3, System Center Configuration Manager 2007 SP1, System Center Configuration Manager 2007 SP2

Configuration Manager 2007 客户端按计划下载其客户端策略。此值使用“策略轮询间隔(分钟)”选项进行配置,默认情况下,此值配置为每 60 分钟。(要识别您可以配置此选项的对话框,请参阅计算机客户端代理属性:“常规”选项卡。)然而,您有时可能需要从客户端启动特定策略检索,例如疑难解答方案中或测试时。

使用下列过程在计划的轮询间隔之外从客户端启动特定策略检索:使用 Configuration Manager 客户端上的“操作”选项卡或在计算机上运行脚本。您必须使用本地管理权限登录客户端计算机才能执行这些过程。

备注

相同的过程可用于 SMS 2003 客户端,在客户端计算机的控制面板中称为“系统管理”。

使用 Configuration Manager 客户端上的“操作”选项卡手动启动客户端策略检索

  1. 在计算机的控制面板中选择“Configuration Manager”。

  2. 单击“操作”选项卡。

  3. 单击“计算机策略检索和评估周期”,然后单击“启动操作”。

  4. 在提示窗口中单击“确定”,然后单击“确定”关闭 Configuration Manager。

使用脚本手动启动客户端策略检索

  1. 打开文本编辑器,例如记事本。

  2. 将下列内容复制并插入到文件中:

    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
    
  3. 以 .vbs 扩展名保存该文件。

  4. 在客户端计算机上,使用下列其中一种方法运行此文件:

    • 使用 Windows 资源管理器导航到文件,并双击脚本文件。

    • 打开命令提示符并键入:cscript <路径\文件名.vbs>

  5. 在“Windows 脚本宿主”对话框中单击“确定”。

另请参阅

任务

如何配置 Configuration Manager 计算机客户端代理

概念

关于 Configuration Manager 中的客户端策略

其他资源

面向管理 Configuration Manager 客户端的任务

有关其他信息,请参阅 Configuration Manager 2007 Information and Support
要与文档团队联系,请将电子邮件发送至 SMSdocs@microsoft.com。