Stops the Connected User Experiences and Telemetry service and sets it to disabled, after confirming the session actually has administrator rights. Short enough to read in one go, and a common requirement in environments where data protection rules decide what may leave the network.
powershell
# Disable Windows Telemetry
#----------------------------------------
# Requires Administrator previlegues
$isadm = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
if (-not $isadm)
{
Write-Host "<WRITE-LOG = ""*Please run this script as Administrator.*"">"
Write-Host "<WRITE-LOG = ""*If this was a remote execution please provide Administrator credentials.*"">"
Write-Error "Warning: Not running as Administrator."
}
else {
Stop-Service DiagTrack -Force
Set-Service DiagTrack -StartupType Disabled
Write-Host "Windows telemetry disabled!"
}Run it across your fleet
This script runs as-is on a single host. Paste it into ServerEngine to schedule it, run it on a whole server group in parallel, and keep the credentials out of the file — see the scripts documentation and the credential store.
More in Security & Auditing
Enable the Windows Firewall with PowerShell
2026-08-17Check Windows Firewall Status with PowerShell
2026-08-17Disable SMBv1 with PowerShell
2026-08-17Enforce TLS 1.2 in the Registry with PowerShell
2026-08-17Enable RDP Network Level Authentication with PowerShell
2026-08-17Audit the Local Administrators Group with PowerShell
2026-08-17Ready when you are.
Try ServerEngine free for 7 days.