Forum Discussion
Cant fully remove user profile Win10 Enterprise V2004
We had the same problem, we even stumbled upon a Critical Error when attempting to open the Start Menu after the same user that had just been removed signed back in again. I figured it must have something to do with the User GUID, so I searched for that in the registry and removed most instances. I then created a DOS batch script to make it easier the next time. Here it is. Feel free to adjust to your needs.
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit" /v "LastKey" /d "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" /f
start "" regedit
Msg * "Copy the the correct Profile GUID from the Registry Editor and close the Registry Editor, then paste the Profile GUID in the batch script"
SET /P PROFILE_GUID="Please paste the GUID "
REG DELETE "HKEY_CLASSES_ROOT\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\Deployment\AppExtension\windowsudk.storage.registerschema\%PROFILE_GUID%" /f
REG DELETE "HKEY_CLASSES_ROOT\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\Deployment\Package\*\%PROFILE_GUID%" /f
REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\IdentityStore\Cache\%PROFILE_GUID%" /f
REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features\%PROFILE_GUID%" /f
REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppReadiness\%PROFILE_GUID%" /f
REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\%PROFILE_GUID%" /f
REG DELETE HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\UserTile\ /v %PROFILE_GUID% /f
REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\DataStore\%PROFILE_GUID%" /f
REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\%PROFILE_GUID%" /f
REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\%PROFILE_GUID%" /f
REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\Status\%PROFILE_GUID%" /f
REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\%PROFILE_GUID%" /f
REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileService\References\%PROFILE_GUID%" /f
REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WlanSvc\ProfileSync\PerUser\%PROFILE_GUID%" /f
REG DELETE "HKEY_USERS\.DEFAULT\Software\Microsoft\IdentityCRL\DeviceIdentities\production\%PROFILE_GUID%" /f
REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\%PROFILE_GUID%" /f
explorer "C:\Users"
Msg * "Shift+Delete the User Folder and then the Profile Removal is all done"
GreatToHearFromYou Thanks very much for that information.
Its quite unusual for this to happen, its 2 from 2 attempts. The other user is overseas and a director so we couldn't spend anymore time on it so she is using a new laptop now.
For the remaining user it will be up to my boss if he wants anymore time spent on it now but I will keep this handy either way as it may happen again.
Thanks again
- GreatToHearFromYouOct 01, 2020Brass Contributor
pmgoes You're very welcome. I really think this is a new problem in v2004, I've never had this problem before. I am not sure how long your company is using the 2004 version now, but we just started deploying v2004 for only new computers, or computers that are showing problems and I've already encountered the problem twice, so 2 for 2, thus currently 100% fail rate. The first time it happened to the VP of HR so I couldn't investigate more (just like you), The second time it happened while setting up a new computer, that gave me more time to investigate and come up with the script. I've been helped so many times by the Tech Community, so it is nice to pay it forward 🙂 👍
- warrenwOct 01, 2020
Microsoft
GreatToHearFromYou pmgoes Thanks for posting more information to the this thread.
GreatToHearFromYou Are you also using folder redirection for any folders? Are you using the control panel app to delete the profiles or deleting them manually?
- GreatToHearFromYouOct 01, 2020Brass Contributor
warrenw We do use folder redirection, but only for computers deployed to our Shop Floor, not on any Office computers. Both times the profile rebuilt was done (and failed) was on Office computers.
We remove them manually by either Deleting or Renaming the User Folder and then removing the User Profile GUID from the ProfileList in the Registry. However, it seems like pmgoes does use the Control Panel and is facing similar issues.