I'm wondering how to safely remove a domain user profile from a computer that is a part of a domain. I don't want to delete the account from the domain itself, I just need to remove the profile from this computer, to do some cleanup.
I'm currently on a Vista Business computer, but we also have Win XP Pro and Win 7 Pro.
Method 1 (easy and safe)
Method 2 (slight variation of method 1)
The greyed out button possibly means that the registry hive has not been released by the operating system, as pointed out by @joeqwerty in the comments.
Method 3 (manual and prone to errors)
Delete the
C:\Users\[ACCOUNT]
directory. That leaves some registry entries behind that have to be manually deleted as follows.HKEY_USERS
branchComputer\HKEY_USERS\[SID]\Software\Microsoft\Windwos\CurrentVersion\Explorer\Shell Folders
C:\Users\ACCOUNT\Desktop
You are in the right
HKEY_USERS\[SID]\Software\Microsoft\Windwos\CurrentVersion\Explorer\Shell Folders
branch if the ACCOUNT in "Shell Folders" matches the ACCOUNT you just manually deleted form theC:\Users\[ACCOUNT]
directory. This branch [SID] can be exported and/or deleted to clean up the last of the user profile.In case if user profile folder is/was deleted manually, you need to make changes to registry
1. Open "regedit.exe"
2. Navigate to "HKLM\Software\Microsoft\Windows NT\CurrentVersion\ProfileList"
3. Click the sub-key that corresponds with the profile you deleted and right click and delete it.
The safest method is as follows. (Written on Windows 7, but applicable to XP onwards)
Computer
and selectProperties
Advanced System Settings
[Skip this step on XP]Advanced
TabUser Profiles
, selectSettings
(NB: This may take some time to enumerate)Delete
This will remove any profile data on the local machine. Do not be tempted to just delete the profile directory as this will leave registry entries behind that will cause problems on Vista onwards.
I also recommend "RemProf" from the excellent Ctrl-Alt-Del TS Util Pack. Ignore that the pack is terminal services centric, the utility works fine on desktop editions. Just note the different versions for XP/2003 and Vista/7/2008/R2
If the account is grayed out, then the account has Windows services or scheduled tasks tied to it. You will need to change the account on these services or task. Once done you will have to re-boot the PC and then it will allow you to delete the profile.
TLDR
Run
sysdm.cpl
> Advanced > User Profiles > Settings > User Profiles > Select the account > Delete.If "Delete" is greyed out
Most likely some process/service is running under this account.