Created
January 27, 2017 03:44
-
-
Save okitavera/e61f6f2c2dfec729347a67f9337efcfb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Disable the DiagTrack service | |
Get-Service DiagTrack | | |
Stop-Service -Verbose -PassThru | | |
Set-Service -StartupType Disabled -Verbose | |
# Disable compattelrunner.exe launched by scheduled tasks | |
'Microsoft Compatibility Appraiser', | |
'ProgramDataUpdater' | ForEach-Object { | |
Get-ScheduledTask -TaskName $_ -TaskPath '\Microsoft\Windows\Application Experience\' | | |
Disable-ScheduledTask | |
} | |
# Stop and remove Diagtrack ETL trace session under | |
# C:\ProgramData\Microsoft\Diagnosis\ETLLogs\AutoLogger\ | |
Get-EtwTraceSession | | |
Where Name -match '(AutoLogger-)?Diagtrack-Listener'| | |
Remove-EtwTraceSession | |
del C:\ProgramData\Microsoft\Diagnosis\ETLLogs\AutoLogger\AutoLogger-Diagtrack-Listener.etl -ErrorAction SilentlyContinue | |
# Disable the Autologger session at the next computer restart | |
Set-AutologgerConfig -Name 'AutoLogger-Diagtrack-Listener' -Start 0 | |
# Other idea: block the diagtrack service at firewall level | |
New-NetFirewallRule -Name "Block DiagTrack" -Profile Any -Direction Outbound -Action Block -Service DiagTrack -DisplayName "Block DiagTrack" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment