Skip to content

Instantly share code, notes, and snippets.

@dw72
Created March 22, 2018 09:06
Show Gist options
  • Save dw72/febfe7b5bfc5d2db6a75fb3c114ba1a5 to your computer and use it in GitHub Desktop.
Save dw72/febfe7b5bfc5d2db6a75fb3c114ba1a5 to your computer and use it in GitHub Desktop.
Check and remove orphaned profiles from Windows registry
$regpath="HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList"
Get-ChildItem -path $regpath
Remove-Item "$($regpath)\S-1-5-21-2762740241-1875924150-698178130-3300" -Force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment