There are two ways to deploy the Datadog Agent on Windows devices for End User Device Monitoring. Choose the method that fits your environment:
Manual install: Run a PowerShell command directly on the device. Use this method to test a single machine or for devices that are not managed by a mobile device management (MDM) solution.
MDM deploy: Push the Agent to a fleet of enrolled Windows devices. This example uses Microsoft Intune to deploy the Agent as a Win32 app in the background with no interaction on each device.
The infrastructure_mode: end_user_device setting is required. Without it, the device does not appear in the End User Devices view and is billed as a host.
Use this method to test a single machine or for devices that are not managed by an MDM solution.
Copy the provided installation command beginning with [System.Net.ServicePointManager]::SecurityProtocol =.
Right-click the Start menu and select Windows PowerShell (Admin) or Terminal (Admin). Click Yes on the User Account Control prompt.
Paste and run the command in PowerShell. The script downloads the installer, installs the Agent silently, and starts the Datadog Agent service. Installation takes two to three minutes.
Verify the installation
To confirm that the Agent is running, in Datadog, go to Infrastructure > End User Devices. Your device appears within 5-10 minutes. If it does not appear after 10 minutes, verify your API key and confirm that the configuration was saved and the Agent was restarted.
Alternatively, run the following command in PowerShell to verify the installation:
This example method packages the Datadog Agent MSI and a PowerShell configuration script into an Intune Win32 app, which Intune pushes to enrolled Windows devices in the background. No manual steps are needed on each device.
Prepare the install script and package files
Create a working folder on your computer, such as C:\DDPackage\, and add the following three files:
Install.ps1. Create this file with the following content, replacing the placeholder with your API key:
# Install.ps1 - Datadog Agent End User Device Monitoring (Intune Win32)$apiKey="<YOUR_API_KEY>"$site="datadoghq.com"$msi=Join-Path$PSScriptRoot'datadog-agent-7-latest.amd64.msi'# Silent install - passes API key and site directly to the MSI$p=Start-Processmsiexec.exe-PassThru-Wait-ArgumentList('/qn','/norestart','/log','C:\Windows\SystemTemp\install-datadog.log','/i',"`"$msi`"","APIKEY=`"$apiKey`"","SITE=`"$site`"",'DD_INFRASTRUCTURE_MODE="end_user_device"')if($p.ExitCode-ne0){Write-Host"msiexec failed with exit code $($p.ExitCode). Check the log at C:\Windows\SystemTemp\install-datadog.log"-ForegroundColorRedexit1}Write-Host'Datadog Agent installation complete.'
If your Datadog site is not US1, update $site to match. For the list of sites, see Datadog sites.
For production deployments, avoid hardcoding the API key in the script. Consider storing the key in an Intune Proactive Remediations environment variable, or deploy it separately using the Intune Win32 app SYSTEM context.
Uninstall.ps1. Create this file for clean removal:
In the Detection rules tab, select Manually configure detection rules and add a File detection rule:
Path: C:\Program Files\Datadog\Datadog Agent\bin
File or folder: agent.exe
Detection method: File or folder exists
In the Assignments tab, assign the app to the device groups or users you want to target. Use Required to push the app in the background without user action.
Click Review + create, and then click Create to publish the app.
Intune deploys Win32 apps using the Intune Management Extension. The script runs in the SYSTEM context, so it has the privileges needed to install the MSI and modify C:\ProgramData\Datadog\datadog.yaml.
Verify the deployment
To confirm that the Agent installed on a device, use one of the following methods:
In Intune, go to Apps > All apps > Datadog Agent EUDM and check the Device install status. Successful installs appear as Installed. If a device shows Failed, check C:\ProgramData\Microsoft\IntuneManagementExtension\Logs\IntuneManagementExtension.log for details.
On a target device, open PowerShell and run & "C:\Program Files\Datadog\Datadog Agent\bin\agent.exe" status. In the output, confirm that Status is Running and infrastructure_mode: end_user_device is set.