About HP WxP
Through the HP Workforce Experience (WxP) platform, organizations can rapidly deploy SurePath AI configurations to their entire fleet for immediate visibility and governance of human, app, and agent usage of AI.
β
This document covers the steps to distribute the proxy configuration and root CA certificate via HP WxP, through the SurePath AI provided PowerShell script.
Supported platforms
Windows 10 version 1709 and later
Windows 11 (Home, S, Pro, Education, Enterprise, and IoT Enterprise editions)
Background
The SurePath AI PAC file
SurePath AI distributes its proxy information via a Proxy Auto-Config (PAC) file. This PAC file contains all the information needed to direct only generative AI traffic to the SurePath AI proxy service while sending other traffic via their normal route.
The use of a PAC file also allows SurePath AI to update the list of generative AI domains. Most operating systems and browsers will request the PAC file every 1-2 hours and if a new file can't be retrieved the current one will continue to be used.
The SurePath AI root CA certificate
Just like other network security and SASE vendors, certificate trust allows SurePath AI to intercept and apply policy to connections to generative AI websites. The SurePath AI root CA certificate needs to be trusted by all devices that need to be governed by SurePath AI.
Configuring WxP
WxP Remediation scripts will be configured to execute the SurePath AI provided PowerShell deployment script. The script may be configured prior to upload to WxP to meet your organizational needs, as defined below.
Prerequisites
The following items are needed before deploying SurePath AI through WxP:
Create a Proxy connector and acquire the PAC URL
Click Connectors in the CONFIGURE section
Click ADD CONNECTOR in the upper right
Provide a descriptive name for the connector (for example, "WxP Deployment")
Select Proxy as the connector type
Click SAVE to generate the unique PAC file URL and MDM depoyment files
Download the PowerShell deployment script
The PowerShell deployment script provides a flexible and automated way to configure proxy settings on Windows devices. To download the script:
From the Proxy connector details page, locate the MDM Files section
Click the DOWNLOAD button to download the MDM deployment files
Extract the ZIP file to access
SurePath.AI.deploy.ps1for Windows deployment
Overview of PowerShell script deployment via WxP
The PowerShell deployment script provides the most flexible and streamlined approach for deploying SurePath AI proxy configurations to Windows devices through HP WxP. This method is recommended for most deployments because it simplifies configuration management, supports both single-user and shared device scenarios, enables email-based user identification for improved reporting, and allows for easier updates to proxy settings compared to managing multiple individual Group Policy settings.
Benefits and flexibility
The PowerShell script offers several advantages over manual Group Policy configuration:
Simplified deployment: A single script manages all proxy settings, certificate installation, and security policies rather than creating multiple separate Group Policy settings
User identification: The script can detect and include user email addresses in the PAC URL, which enables SurePath AI to associate native application traffic with specific users rather than just the connector, improving visibility in User Activity logs and enabling user-specific policy application
Flexible configuration: The script supports multiple deployment scenarios through configurable parameters, including single-user devices, shared computers with multiple users, and optional features like email detection
Easier maintenance: Updating proxy configurations requires only modifying the script parameters rather than recreating multiple WxP remediation scripts
Built-in intelligence: The script includes automatic detection of deployment context, intelligent removal capabilities, and fallback mechanisms for maximum reliability
Understanding WxP 'Run as' execution context
When deploying PowerShell scripts through WxP, admins need to understand how the 'Run as' execution context for remediation scripts work:
System scripts execute under the system context. These scripts run with Local System privileges and can modify machine-wide settings in HKLM registry, install certificates to the Local Machine store, and make system-level changes. Use Computer Configuration startup scripts for single-user device deployments and for machine setup in shared device scenarios.
Logged on User scripts execute run under that user's credentials. These scripts can modify user-specific settings in HKCU registry but have limited privileges. Use User Configuration logon scripts for deploying user-specific configurations in shared device scenarios.
Important: 64-bit PowerShell requirement
The SurePath AI deployment script must run in 64-bit PowerShell on 64-bit Windows systems. When adding scripts to Group Policy, always use the full path to 64-bit PowerShell: %SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe. This ensures proper script execution and compatibility with modern Windows environments. Only use the 32-bit path (%SystemRoot%\SysWOW64\WindowsPowerShell\v1.0\powershell.exe) if deploying to 32-bit Windows systems, which are rare in enterprise environments.
WxP Deployment - Single-user devices (Recommended)
For devices where only one user regularly signs in, the PowerShell script can be configured to deploy a complete system-wide configuration through a Computer Configuration startup script. This approach is ideal for personal work devices, dedicated workstations, or scenarios where each device is assigned to a specific user. Since there is only one user per device, the script can run with Local System privileges to install the certificate, configure the PAC URL, and apply security policies all at once.
Create the System Remediation Script
In the left menu of WxP, select Remediations > Scripts
Click Add Script
Select the
SurePath.AI.deploy.ps1Powershell script downloaded previously from your SurePath AI tenantSelect "Action" as the operation
Click Next
Leave "Run as" to the default System setting
Click Next
Name the Script and provide a Description as you desire
Click Add
Create the Script Assignment
Click in to the Script you just created
Select Assignments tab at the top
Select Add
Select the group of devices you want to assign the Script to deploy on
Click Next
Name the Assignment and provide a Description as you desire
Click Next
Click Add
Add Schedule to the Script Assignment
Click in to the Assignment you just created
Scroll to the bottom, and select Add Schedule
Choose a frequency and recurrence.
Recommended: Select daily, recurring every 1 days
Click Save
View Status of Assignment Execution
Within the Script Assignment, click on the Activity tab at the top. You can view Scheduled Script executions and status here to ensure your deployment is executing as desired.
Validate SurePath AI Configuration
After successful execution through WxP, you can validate the SurePath AI configuration on a device as detailed here.
WxP Deployment - Shared/multi-user devices
For devices where multiple users sign in, such as shared workstations, kiosks, or terminal servers, the deployment requires a two-step approach. The first step installs the root CA certificate and configures security policies at the machine level, while the second step deploys user-specific proxy settings when each user signs in.
Step 1: System script setup
The system script setup configures components that apply to all users on the device:
Installs the SurePath AI root CA certificate to the Local Machine trusted certificate store
Configures policies that prevent users from changing proxy settings
Admins can perform this step by configuring the PowerShell script with the -NoProxy flag deployed via WxP Remediation scripts executed at the System context.
To configure the script for machine setup:
Open the
SurePath.AI.deploy.ps1file in a text editorLocate the
$argumentOverride = ""lineSet the override to configure machine setup without proxy:
$argumentOverride = "-NoProxy"
Save the modified script file
Deploy this version of the script through WxP Remediation Scripts using System as the 'Run as' context.
Step 2: User-level proxy configuration (runs in each user account)
After the system is set up, each user who signs in needs their own proxy configuration. This step deploys the PAC URL with user-specific identifiers (GUID by default, or optionally email addresses) to each user's registry (HKCU) using User Configuration logon scripts, enabling SurePath AI to track activity by individual users rather than just by device.
To configure the script with default GUID-based identification:
Open a new copy of
SurePath.AI.deploy.ps1in a text editor (or use the same file if Option B was not used)Locate the
$argumentOverride = ""lineSet the override to configure user-level proxy:
$argumentOverride = "-User"
Save the modified script file with a different name to distinguish it from the machine setup script (for example,
SurePath.AI.deploy.user.ps1)
Deploy this version of the script through WxP Remedation Scripts using Logged on User as the 'Run as' context.
Optional: Email-based identification
Admins can enable email-based identification, which eliminates the need for users to authenticate when accessing AI services. The script will detect each user's email address from multiple identity sources (including Entra ID, Outlook, Office, Intune, Active Directory, and others) and include it in the PAC URL. If email detection fails for a particular user, the script automatically falls back to GUID.
To enable email-based identification, use:
$argumentOverride = "-User -Email"
When configured with the -Email flag, the script attempts to detect the user's email address from multiple sources including Active Directory, Entra ID Registry, and user environment variables. The first successfully detected email address is included in the PAC URL.
Customize the script for specific deployment scenarios
Before deploying the script through Group Policy, admins can optionally configure the argumentOverride variable to specify the deployment parameters.
Default script configuration (System level GUID identifier):
By default, the script includes a unique GUID identifier in the PAC URL for user identification. This approach is recommended because it works reliably in all environments without requiring email address detection, which can vary in availability across different identity configurations. The GUID provides consistent user tracking in SurePath AI's User Activity logs and enables user-specific policy application.
To use the default GUID-based identification, leave the argumentOverride variable empty or do not modify the script:
$argumentOverride = ""
The script will automatically:
Install the SurePath AI root CA certificate to the Local Machine trusted certificate store
Deploy proxy settings system-wide that apply to all users on the device
Generate and include a unique GUID identifier in the PAC URL for user tracking
Optional: Email-based identification
Alternatively, admins can configure the script to detect and use the user's email address for identification. Email-based identification eliminates the need for users to authenticate when accessing GenAI services through SurePath AI, as the platform can automatically identify users based on their email address passed in the PAC URL. However, this approach depends on the availability of email information from identity sources (Active Directory, Entra ID, or user environment variables).
To enable email-based identification:
Open the
SurePath.AI.deploy.ps1file in a text editorLocate the
$argumentOverride = ""line near the top of the scriptSet the override to configure email detection:
$argumentOverride = "-Email"
Save the modified script file
With this configuration, the script attempts to detect the user's email address from multiple sources in this order:
Entra - Uses
dsregcmd /statusto query Azure AD (Entra ID) user information, with fallback to the CloudDomainJoin registryOutlook - Checks Outlook profile registry locations for configured email addresses
Office - Queries M365/Office identity from the Office registry keys
Intune - Queries Intune MDM enrollment data for user email
ActiveDirectory - Queries on-premises Active Directory for the user's email attribute (only on domain-joined devices)
EntraID - Uses the
whoami /upncommand (legacy method)UserEnvironment - Checks the Volatile Environment registry for UPN information
IdentityStore - Checks Windows identity store cache for cached user identities
If email detection fails, the script automatically falls back to using a GUID identifier. Organizations that require email-based identification without fallback can add the -NoGUID flag (e.g., $argumentOverride = "-Email -NoGUID"), though this causes deployment to fail if email cannot be detected.
Verifying the SurePath AI integration
After completing the deployment, verify that the endpoint is properly integrated using the SurePath AI Ready tool.
