Skip to content

Instantly share code, notes, and snippets.

@Ricky-G
Created April 12, 2023 05:02
Show Gist options
  • Save Ricky-G/06cfc632486227b701cf594b7333248f to your computer and use it in GitHub Desktop.
Save Ricky-G/06cfc632486227b701cf594b7333248f to your computer and use it in GitHub Desktop.
Restore taskmgr.exe As The Default Task Manager
## You need to run this in your terminal as admin mode
#################################################################
# Restore taskmgr.exe As The Default Task Manager
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\taskmgr.exe\" -Name 'Debugger'
# Check if PROCEXP64.EXE is still Task Manager
if($null -eq (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\taskmgr.exe\" | Select-Object -ExpandProperty 'Debugger' -ErrorAction Stop)) {
Write-Host "taskmgr.exe if your official Task Manager"
}
@Ricky-G
Copy link
Author

Ricky-G commented May 21, 2023

This script is useful if you have set sysinternals process explorer as the default and would like to turn this off get the Windows task manager back as the default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment