Sometimes I see people removing user profiles by just going into explorer. Going to the %SystemDrive%\User folder, and using delete. Well this worked perfect on Windows 2003. But with upgrades to the profiling system with Windows 2008 and later this is a really bad idea.

There are 2 basic ways to remove user profiles in Windows today. And one for the special people.

Click method:

  1. Control Panel
  2. System
  3. Advanced System Settings
  4. Settings on User Profiles
  5. Select profile
  6. Press Delete

Programmatically:

Fire up Powershell with administrative rights

Check out the SID for the account that you want to remove the profile for, then run:

Get-WmiObject win32_userprofile| Where-Object {$_.SID -eq 'S-1-5-21-1347639444-34920355641-2049490221-1001'} | ForEach {$_.Delete()}

Or just delete all unused profiles:

Get-WmiObject win32_userprofile| Where-Object {$_.Special -eq $False -and $_.Loaded -eq $False} | ForEach {$_.Delete()}
Wanna do it selfer:
  1. Start up Explorer
  2. Go to SystemDrive\Users
  3. Delete Folder
  4. Start RegEdit
  5. Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
  6. Delete key for SID of user