通过 Windows 组策略对象 (GPO) 从多个终端卸载 Password Manager Pro Agent

本文档详细说明了使用 Windows 组策略对象 (GPO) 从多个终端卸载 Password Manager Pro Agent 的步骤。点击此处下载 PMP-Agent-Script 压缩文件。解压该文件并提取 PMPAgentInstallationScript.ps1 和 PMPAgentUninstallationScript.ps1 文件。

在 GPO 中添加卸载脚本的步骤

  1. Right click the name of the GPO you created from the left pane and click Edit settings, delete, modify security. The Group Policy Management editor window will open.
    agent-gpo-5.png
  2. Expand the Policies >> Windows Settings folders. Double click Scripts. In the Scripts window, click Startup and then click Properties.
    agent-gpo-6.png
  3. Switch to the PowerShell Scripts tab and click Show Files. The network directory will open up.
    pmp-agent-gpo-7.png
  4. Now, paste the Password Manager Pro agent PowerShell script file in the GPO network location.
    pmp-agent-gpo-10.pngpmp-agent-gpo-11.png
  5. 点击 添加,在 脚本名称 下添加 'PMPAgentUninstallationScript' 文件名。点击 应用 和 确定 保存设置。
  6. 在 GPO 编辑器中,展开左侧窗格的 管理模板。展开其下的 系统 文件夹并打开 组策略。
  7. Under the Group Policy folder, right click Specify workplace connectivity wait time for policy processing.
    agent-gpo-12.pngagent-gpo-13.pngagent-gpo-14.pngagent-gpo-15.png
  8. In this window, click the Enabled option. Enter the Amount of time to wait as 120 seconds. Click Apply and click OK to save the settings.
    agent-gpo-16.png
  9. GPO 将被应用。重启所有目标终端后,Password Manager Pro Agent 的 PowerShell 脚本将被调用,代理将在目标机器上被卸载。
  10. 卸载成功后,禁用您创建的 GPO(此示例中为 AgentGPO)的启动脚本。这样可以确保脚本不会在每次目标机器重启时被调用。

卸载旧代理后,按照 此链接 中的步骤使用 GPO 安装 C#/Go 代理。

排查步骤

确保 AgentGPO 的优先级高于其他 GPO。这是为了确保其他 GPO 不会覆盖 AgentGPO 的权限。

要检查此项,点击 GPO 名称,右键点击 强制执行 选项,确认其是否已启用。

agent-gpo-17.png

MangeEngine的典型客户