通过 Windows 组策略对象 (GPO) 在终端安装 Password Manager Pro Agent

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

Ensure the below SHA256 value upon downloading the file:
SHA256 Checksum:  

前提条件

  • 请参阅此 帮助页面 中的详细步骤,从 Password Manager Pro 界面下载 Agent 安装压缩包,并复制 Agent 密钥。将密钥保存在安全位置——稍后必须将其添加到 Password Manager Pro PowerShell 脚本中。
  • 如果终端中已安装代理,请按照 这些步骤 使用卸载脚本批量卸载代理。该脚本将卸载 C++ 和 C 两种代理。
  • 创建一个包含所有需要纳入 GPO 的目标计算机的域,这些计算机将作为安装代理的终端。

在域中创建 GPO 并添加目标计算机的步骤

  1. 打开 Server Manager。在右上角,点击 工具 >> 组策略管理。
  2. Right click the Domain name and click the option Create a GPO in this domain, and Link it here.
    agent-gpo-1.png
  3. Provide a name for the new GPO, for example: AgentGPO. Now, click the newly created GPO. Under Scope >> Security Filtering, click Add. In the Select User, Computer, or Group window, enter the target machine names or the name of the group name that contains all the target endpoints. You can also enter the names of the target machines individually. Click OK.
    agent-gpo-2.pngagent-gpo-3.png
  4. Switch to the Delegations tab. Right click the group you added and provide full access permission as shown below.
    agent-gpo-4.png
    You have successfully created a Group Policy and added the target machines where the Password Manager Pro Agent is to be installed.

在 GPO 中添加安装脚本和 Agent 安装压缩包的步骤

  1. Now right click the GPO name 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. Copy the path of the network location.
    pmp-agent-gpo-7.png
  4. 在编辑器中打开 Password Manager Pro PowerShell 脚本。将上一步复制的网络位置路径添加为源变量,例如:"\\zylker.com\SysVol\zylker.com\Policies\{33A6F6BE-4A9E-4CCA-AB5A-7C96E14F2ACB}\Machine\Scripts\Startup\PMP_WindowsAgent_CS.zip",以及所需的目标路径,例如:c:\Program Files。这是代理将在目标终端安装的位置,请确保所有目标计算机均可访问此路径。
  5. Now, paste the Password Manager Pro agent PowerShell script file and the Agent installation zip in the GPO network location.
    pmp-agent-gpo-8.png
  6. pmp-agent-gpo-9.png
  7. 点击 添加,在 脚本名称 下添加 'PMPAgentInstallationScript' 文件名,在 脚本参数 下添加从 Password Manager Pro 复制的 Agent 安装密钥。点击 应用,然后再次点击 确定 保存设置。
  8. 在 GPO 编辑器中,展开左侧面板的 管理模板。展开其下的 系统 文件夹并打开 组策略。
  9. 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
  10. 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
  11. GPO 将被应用。重启所有目标终端后,将调用 Password Manager Pro Agent PowerShell 脚本,代理将在目标计算机上安装。
  12. 代理安装成功后,禁用你创建的 GPO(例如 AgentGPO)中的启动脚本。这将确保脚本不会在每次目标计算机重启时被调用。

排查步骤

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

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

agent-gpo-17.png

MangeEngine的典型客户