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. # hosts file. Hard coded telemetry related IPs are blocked by Windows firewall.
# Additionally telemetry is disallows via Group Policies. # Additionally telemetry is disallows via Group Policies.
Import-Module -DisableNameChecking $PSScriptRoot\..\lib\reg-helper.psm1
echo "Adding telemetry domains to hosts file" echo "Adding telemetry domains to hosts file"
$hosts = cat "$PSScriptRoot\..\res\telemetry-hosts.txt" $hosts = cat "$PSScriptRoot\..\res\telemetry-hosts.txt"
$hosts_file = "$env:systemroot\System32\drivers\etc\hosts" $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) -Action Block -RemoteAddress ([string[]]$ips)
echo "Disabling telemetry via Group Policies" echo "Disabling telemetry via Group Policies"
Import-Registry(@" mkdir -Force "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection"
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DataCollection] sp "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection" "AllowTelemetry" 0
"AllowTelemetry"=dword:00000000
"@)

Loading…
Cancel
Save