1
- function Disable-Telemetry {
1
+ function DisableTelemetry {
2
2
Write-Output " Disabling telemetry via Group Policies"
3
3
New-FolderForced - Path " HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection"
4
4
Set-ItemProperty - Path " HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection" " AllowTelemetry" 0
@@ -22,7 +22,7 @@ function Disable-Telemetry {
22
22
" a1621.g.akamai.net"
23
23
" a1856.g2.akamai.net"
24
24
" a1961.g.akamai.net"
25
- # "a248.e.akamai.net" # makes iTunes download button disappear (#43)
25
+ # "a248.e.akamai.net" # makes iTunes download button disappear
26
26
" a978.i6g1.akamai.net"
27
27
" a.ads1.msn.com"
28
28
" a.ads2.msads.net"
@@ -210,12 +210,55 @@ function Disable-Telemetry {
210
210
Remove-NetFirewallRule - DisplayName " Block Telemetry IPs" - ErrorAction SilentlyContinue
211
211
New-NetFirewallRule - DisplayName " Block Telemetry IPs" - Direction Outbound `
212
212
- Action Block - RemoteAddress ([string []]$ips )
213
+ Set-ItemProperty - Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection" - Name " AllowTelemetry" - Type DWord - Value 0
214
+ Set-ItemProperty - Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Policies\DataCollection" - Name " AllowTelemetry" - Type DWord - Value 0
215
+ Set-ItemProperty - Path " HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection" - Name " AllowTelemetry" - Type DWord - Value 0
216
+ If (! (Test-Path " HKLM:\SOFTWARE\Policies\Microsoft\Windows\PreviewBuilds" )) {
217
+ New-Item - Path " HKLM:\SOFTWARE\Policies\Microsoft\Windows\PreviewBuilds" - Force | Out-Null
218
+ }
219
+ Set-ItemProperty - Path " HKLM:\SOFTWARE\Policies\Microsoft\Windows\PreviewBuilds" - Name " AllowBuildPreview" - Type DWord - Value 0
220
+ If (! (Test-Path " HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\Software Protection Platform" )) {
221
+ New-Item - Path " HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\Software Protection Platform" - Force | Out-Null
222
+ }
223
+ Set-ItemProperty - Path " HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\Software Protection Platform" - Name " NoGenTicket" - Type DWord - Value 1
224
+ If (! (Test-Path " HKLM:\SOFTWARE\Policies\Microsoft\SQMClient\Windows" )) {
225
+ New-Item - Path " HKLM:\SOFTWARE\Policies\Microsoft\SQMClient\Windows" - Force | Out-Null
226
+ }
227
+ Set-ItemProperty - Path " HKLM:\SOFTWARE\Policies\Microsoft\SQMClient\Windows" - Name " CEIPEnable" - Type DWord - Value 0
228
+ If (! (Test-Path " HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppCompat" )) {
229
+ New-Item - Path " HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppCompat" - Force | Out-Null
230
+ }
231
+ Set-ItemProperty - Path " HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppCompat" - Name " AITEnable" - Type DWord - Value 0
232
+ Set-ItemProperty - Path " HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppCompat" - Name " DisableInventory" - Type DWord - Value 1
233
+ If (! (Test-Path " HKLM:\SOFTWARE\Policies\Microsoft\AppV\CEIP" )) {
234
+ New-Item - Path " HKLM:\SOFTWARE\Policies\Microsoft\AppV\CEIP" - Force | Out-Null
235
+ }
236
+ Set-ItemProperty - Path " HKLM:\SOFTWARE\Policies\Microsoft\AppV\CEIP" - Name " CEIPEnable" - Type DWord - Value 0
237
+ If (! (Test-Path " HKLM:\SOFTWARE\Policies\Microsoft\Windows\TabletPC" )) {
238
+ New-Item - Path " HKLM:\SOFTWARE\Policies\Microsoft\Windows\TabletPC" - Force | Out-Null
239
+ }
240
+ Set-ItemProperty - Path " HKLM:\SOFTWARE\Policies\Microsoft\Windows\TabletPC" - Name " PreventHandwritingDataSharing" - Type DWord - Value 1
241
+ If (! (Test-Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\TextInput" )) {
242
+ New-Item - Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\TextInput" - Force | Out-Null
243
+ }
244
+ Set-ItemProperty - Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\TextInput" - Name " AllowLinguisticDataCollection" - Type DWord - Value 0
245
+ Disable-ScheduledTask - TaskName " Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" | Out-Null
246
+ Disable-ScheduledTask - TaskName " Microsoft\Windows\Application Experience\ProgramDataUpdater" | Out-Null
247
+ Disable-ScheduledTask - TaskName " Microsoft\Windows\Autochk\Proxy" | Out-Null
248
+ Disable-ScheduledTask - TaskName " Microsoft\Windows\Customer Experience Improvement Program\Consolidator" | Out-Null
249
+ Disable-ScheduledTask - TaskName " Microsoft\Windows\Customer Experience Improvement Program\UsbCeip" | Out-Null
250
+ Disable-ScheduledTask - TaskName " Microsoft\Windows\DiskDiagnostic\Microsoft-Windows-DiskDiagnosticDataCollector" | Out-Null
251
+ # Office 2016 / 2019
252
+ Disable-ScheduledTask - TaskName " Microsoft\Office\Office ClickToRun Service Monitor" - ErrorAction SilentlyContinue | Out-Null
253
+ Disable-ScheduledTask - TaskName " Microsoft\Office\OfficeTelemetryAgentFallBack2016" - ErrorAction SilentlyContinue | Out-Null
254
+ Disable-ScheduledTask - TaskName " Microsoft\Office\OfficeTelemetryAgentLogOn2016" - ErrorAction SilentlyContinue | Out-Null
255
+ Write-Output " Done"
213
256
}
214
257
215
258
function PrivacyFixSettings {
216
259
# Description:
217
- # This script will try to fix many of the privacy settings for the user. This
218
- # is work in progress!
260
+ < # This script will try to fix many of the privacy settings for the user. This
261
+ is work in progress!#>
219
262
220
263
Import-Module - DisableNameChecking $PSScriptRoot \..\lib\New-FolderForced .psm1
221
264
Import-Module - DisableNameChecking $PSScriptRoot \..\lib\take- own.psm1
@@ -380,4 +423,12 @@ function DisableAdvertisingID {
380
423
}
381
424
Set-ItemProperty - Path " HKLM:\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo" - Name " DisabledByGroupPolicy" - Type DWord - Value 1
382
425
Write-Output " done"
426
+ }
427
+
428
+ function DisableActivityHistory {
429
+ Write-Output " Disabling Activity History..."
430
+ Set-ItemProperty - Path " HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" - Name " EnableActivityFeed" - Type DWord - Value 0
431
+ Set-ItemProperty - Path " HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" - Name " PublishUserActivities" - Type DWord - Value 0
432
+ Set-ItemProperty - Path " HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" - Name " UploadUserActivities" - Type DWord - Value 0
433
+ Write-Output " Done"
383
434
}
0 commit comments