--- title: "使用 SCCM 或 Microsoft Intune 卸载 WXP Insights Windows 代理" slug: "uninstalling-the-wxp-insights-windows-agent-with-sccm-or-microsoft-intune" description: "Uninstall the HP Insights for Windows Application using SCCM v.1902 or Intune with our step-by-step guide and PowerShell script instructions." updated: 2026-08-19T23:19:57Z published: 2026-08-19T23:19:57Z canonical: "learn.workforceexperience.hp.com/uninstalling-the-wxp-insights-windows-agent-with-sccm-or-microsoft-intune" --- > ## Documentation Index > Fetch the complete documentation index at: https://learn.workforceexperience.hp.com/llms.txt > Use this file to discover all available pages before exploring further. # 使用 SCCM 或 Microsoft Intune 卸载 WXP Insights Windows 代理 ## 简介 如果 Windows 版 WXP Insights 代理是通过 Microsoft System Center Configuration Manager(SCCM)安装的,这些指令基于版本 2203。其他SCCM版本的步骤可能略有不同。 本指南概述了从设备卸载 Windows 版 WXP Insights 代理 的步骤,重点关注 Microsoft SCCM v.2203 或 Intune 环境。 ### 前提条件 1. 从 [这里](https://ftp.hp.com/pub/caps-softpaq/HP_DaaS/DaaS%20Client%20Scripts/GPO/Install/WXP-Insights-Installation-Scripts.zip)下载卸载PowerShell脚本。 2. 解压卸载脚本,保持为 **Local-Folder-Path1**。 3. 确保在 Windows 的 WXP Insights 代理中,已移除部署(目标安装),该代理在 Intune 或 SCCM 中创建。 4. 我们正在Intune或SCCM中创建新应用,以检测WXP Insights代理的存在并自动卸载。把这当作新部署(安装活动)。 ## Intune 准备步骤: 1. 要将卸载脚本转换为 **Intunewin** 格式,请从以下平台下载 Win32 内容准备工具: `https://github.com/Microsoft/Microsoft-Win32-Content-Prep-Tool` 2. 将 **IntuneWinAppUtil.exe** 保存到[**下载文件夹路径**]。 3. 打开管理员命令提示符,使用**cd**命令进入**[Download-Folder-Path]**,执行以下命令将卸载脚本转换为**Intunewin**格式。 4. 将 **[Local-Folder-Path1]** 替换为卸载脚本解压的本地文件夹。 `IntuneWinAppUtil.exe -c [Local-Folder-Path1] -s WXPInsights-Uninstall-Script.ps1 -o [Local-Output-Folder-Path]`。 例如: `IntuneWinAppUtil.exe -c “C:\UninstallScript\” -s wxp-insights-uninstall-script.ps1 -o “C:\IntuneFiles\”` > **注:** 在运行上述命令前,确保UninstallScript和IntuneFiles在C盘创建的文件夹,且UninstallScript文件夹包含WXPInsights-Uninstall-Script.ps1文件。 5. 文件转换成功后,将会出现以下 **Intunewin** 文件: `wxp-insights-uninstall-script.intunewin` ### 在 Intune 中创建应用程序 要创建新的Intune应用包以卸载Windows 版 WXP Insights 代理: 1. 登录 [Azure门户](https://intune.microsoft.com/#home)。主 **页显示** 出来。 2. 进入**Microsoft Intune管理中心**,点击Windows**>应用>平台。** 3. 点击 **创建** 并选择 **应用类型** 为“Windows应用(Win32)”,然后点击 **选择**。 4. 点击 **选择应用包文件。** 5. 选择转换后的Intunewin文件 `wxp-insights-uninstall-script.intunewin` 6. 点击 **确定**。 7. 在 **应用信息** 页面输入以下信息,然后点击 **“下一步**”。 1. **Name**: Uninstall for WXP Insights agent for Windows 2. **出版商**:惠普公司 3. **版本**:1.X.X.X(替换为脚本中提到的 HPInsights-Uninstall-Script.ps1 版本) 8. 在 **程序** 页面,在安装命令中输入 `powershell.exe -ExecutionPolicy Bypass -File .\wxp-insights-uninstall-script.ps1` 9. 输入卸载命令为“无”。 10. 点击 **复习+保存**。 11. 在 **需求** 标签页: 1. 在 **Check 操作系统架构中:** 1. 选择 **“是**”。指定应用可以安装在哪些系统上 2. 选择 **在x64系统上安装**。 3. 安装在Arm64系统上 > **注意**:只有当目标设备在 Arm 平台上时,才选择此选项。 2. 根据目标环境选择 **最小操作系统** 。例如:Windows 10 1607 12. 点击 **复习+保存**。 13. 在 **检测** 规则标签页中,选择 **规则格式** 为“使用自定义检测脚本”。 1. 将以下内容保存到 `WXPInsights-Detection-Script.ps1` 本地设备的文件中,并选择此为脚本文件 ```plaintext $service = Get-Service -Name "hpLHAgent" -ErrorAction SilentlyContinue if ($null -eq $service) { exit 1 } exit 0 ``` 1. 点击 **“复习+保存”。** 2. 在 **“评测+保存** ”标签页中,点击 **保存。** ### 在 Intune 中部署应用: 1. 在 **“分配** ”部分,点击编辑选项。 2. 在 **分配** 标签页中,进入 **“必需** ”部分,选择 **“添加组”、“添加所有用户”或** “根据部署策略和目标 **添加所有设备** ”。 3. 对于**静默安装**,请点击终端**用户通知**部分中的**“显示所有吐司通知**”。 4. 在 **终端用户通知**中,选择 **隐藏所有吐司通知** 并点击 **确定**。 5. 点击 **复习+保存。** 6. 在 **“评测+保存** ”标签页中,点击 **保存**。 ## SCCM ### 前提条件 > 确保卸载脚本 `WXPInsights-Uninstall-Script.ps1`在SCCM服务器系统的UNC路径复制。 ### 在SCCM中创建应用程序 1. 登录 **SCCM管理控制台** ,启动 **创建应用程序** 向导。 2. 在SCCM管理控制台中,点击 **软件库**。 3. 在**软件库**工作区中,点击**应用管理**>**应用>创建应用程序**。 4. 选择“ **手动指定应用信息**”选项。 5. 点击 **下一步**。 6. 输入以下信息并点击 **下一步**: 1. **Name**: Uninstall for WXP Insights agent for Windows 2. **出版商**:惠普公司 3. **版本**:1.X.X.X(替换为脚本内提到的wxp-insights-uninstall-script.ps1版本)。 7. 点击 **“下一步** ”以接受 **应用目录** 条目的默认设置。 8. 点击 **下一步**。 9. 点击 **添加** 以创建新的 **部署类型** ,并选择 **类型** 为“脚本安装程序”。 10. 手动指定部署类型信息,自动选择。 11. 点击 **下一步**。 12. 对于**部署类型**,输入名称为“移除HP Insights应用程序 - 静默安装”。 13. 点击 **下一步**。 14. 在**内容位置**中,指定文件的`wxp-insights-uninstall-script.ps1`网络路径(UNC名称)。例如:`\\WIN-Server-PC\Softwares\HP\Uninstall\` 15. 在 **安装程序**中,将命令指定为“无” 16. 在 **卸载程序中,请** 指定 `powershell.exe -executionpolicy bypass -WindowStyle Hidden -noninteractive -nologo -file "wxp-insights-uninstall-script.ps1"` 17. 在 **64位客户端上选择“作为32位进程运行安装并卸载程序**”选项。 18. 点击 **下一步。** 19. 选择 **使用自定义脚本来检测该部署类型的存在**。 20. 点击 **编辑**。 21. 对于 **脚本类型**,选择“Powershell”下拉菜单。 22. 请提供以下脚本内容: ```plaintext $service = Get-Service -Name "hpLHAgent" -ErrorAction SilentlyContinue if ($null -eq $service) { exit 1 } exit 0 ``` 23. 点击 **确定**;然后点击 **“下一步**”。 24. 在 **安装行为中,选择** “安装系统”。 25. 对于 **登录要求**,选择“用户是否被登录”。 26. 点击 **“下一步** ”直到显示关闭按钮。然后,点击 **关闭。** ### 在SCCM中部署应用程序: 1. 登录SCCM管理控制台,点击 **软件库**。 2. 在**软件库**工作区中,右键点击“**卸载 for WXP Insights Windows Application**”,然后点击**部署。** 3. 在收藏中,点击 **浏览**...: 4. 根据部署策略,点击 **用户集合或设备集合** ,选择目标设备和用户进行卸载。 5. 点击 **确定** ,然后选择 **下一步。** 6. 确保窗口显示配 **电点** 。 7. 点击 **下一步。** 8. 在 **部署设置**中,选择 **动作** 作为“卸载”。 9. 点击 **“下一步** ”,然后 **点击“下一步**”。 10. 在 **用户体验** 设置中,选择 **“隐藏在软件中心和所有通知** ”的下拉菜单,选为“用户通知:设置”。 11. 点击**“下一步直到关闭**”按钮显示,然后点击**关闭**。 #### 关于使用 Intune 或 SCCM 卸载 WXP Insights 代理的通用说明 > [!WARNING] > **重要提示**:如果客户或IT管理员执行严格的PowerShell执行策略(如AllSigned、RemoteSigned或其他受限执行策略),则提供的卸载PowerShell脚本wxp-insights-uninstall-script.ps1必须在部署前进行数字签名。在这样的环境中: > > - IT管理员必须用批准的代码签名证书签署提供的PowerShell卸载脚本。在配置Intune或SCCM中的应用部署时,必须使用签名脚本。 > - IT管理员必须确保对应的代码签名证书(或其发出的CA证书)存在于所有目标设备上本地计算机证书存储下的可信根认证机构或可信发布者存储中。 > - 未能满足这些要求可能导致系统执行策略阻挡卸载脚本。 ## 防止卸载后自动重装惠普组件 通过使用 SCCM、Microsoft Intune 或卸载脚本卸载 Windows 版 WXP Insights 代理,会移除 `WXPInsightsAgent`当前安装在设备上的应用包。 `WXPInsightsAnalytics` 然而,卸载这些包并不会阻止它们以后再次安装。 ### 重装场景 `WXPInsightsAgent` 并且 `WXPInsightsAnalytics` 可以在以下情况下重新安装。 - **智能支持注册**:当 `AllowSupport` 在开箱即用体验(OOBE)或通过惠普隐私设置启用同意时, `HPServiceScan` 可以将设备注册到惠普智能支持中。在智能支持注册过程中, `WXPInsightsAgent` 可以 `WXPInsightsAnalytics` 作为智能支持解决方案的必需组件重新安装。欲了解更多信息, 请参阅[惠普智能支持 |惠普®印度](https://www.hp.com/in-en/services/smart-support.html)。 - **Windows 更新交付**:当 `AllowMarketing` `AllowProductEnhancement` 在 OOBE 或通过 HP 隐私设置启用同意时, `WXPInsightsAnalytics` 可以通过 Windows Update 再次提供。在这种情况下,作为 `WXPInsightsAnalytics` 惠普软件组件驱动程序包交付,用于遥测收集,支持产品改进、市场营销和支持服务。 ### 防止重装 为了防止这些组件被重新安装,IT 管理员必须通过 Windows Update 管理策略阻止相应的 HP 软件组件驱动程序包。例如,管理员可以使用驱动程序排除策略、Windows Server Update Services(WSUS)、Microsoft Intune 或 SCCM 控制。IT管理员还必须在适用时禁用智能支持注册机制。 ## **联系我们** 如需帮助,请创建[**支持案例**](/wxp/docs/zh-cn/creating-a-support-case)或发送电子邮件至 [**support@wxp.hp.com**](mailto:support@wxp.hp.com)。