Browse Source

remove reg-import from disable telemetry

pull/31/head
Alex Hirsch 9 years ago
parent
commit
f5b2e479c3
  1. 8
      scripts/disable-telemetry.ps1

8
scripts/disable-telemetry.ps1

@ -3,8 +3,6 @@
# hosts file. Hard coded telemetry related IPs are blocked by Windows firewall.
# Additionally telemetry is disallows via Group Policies.
Import-Module -DisableNameChecking $PSScriptRoot\..\lib\reg-helper.psm1
echo "Adding telemetry domains to hosts file"
$hosts = cat "$PSScriptRoot\..\res\telemetry-hosts.txt"
$hosts_file = "$env:systemroot\System32\drivers\etc\hosts"
@ -29,7 +27,5 @@ New-NetFirewallRule -DisplayName "Block Telemetry IPs" -Direction Outbound `
-Action Block -RemoteAddress ([string[]]$ips)
echo "Disabling telemetry via Group Policies"
Import-Registry(@"
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DataCollection]
"AllowTelemetry"=dword:00000000
"@)
mkdir -Force "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection"
sp "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection" "AllowTelemetry" 0

Loading…
Cancel
Save