Cant fully remove user profile Win10 Enterprise V2004

Copper Contributor

 

Hello everyone


For years I have been able to recreate user profiles by rebooting the machine and then going to control panel and opening up the list of user profiles and deleting it.

I would then confirm no trace of profile in registry here: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\ProfileList

 

Now when I attempt this, things like recycle bin is still full and some onedrive files are left behind.

We suspect the 2004 update may have altered how to recreate profiles.

Does anyone know how to solve this? I have tried on 2 different machines with 2 different users with no luck.

 

Thanks in advance.

12 Replies

@pmgoes  Is there also an entry left in the profiles list in the registry? Do you get an error in the Control Panel applet or does the profile get removed per the app?

@warrenw There are no entries in the registry and the profile does get deleted when removing it via the control panel. I also confirm that the folder is gone in C:\users

One thing I have noted is that in the control panel the profile is listed as unknown user but when I delete it the users folder disappears in the C:\users folder so I know i have removed the right one, also it was the only large profile in control panel.

I have tried this recreation of a profile several times for both affected users but dont manage to get anywhere.

When they log back in the recycle bin is still full and I note with the new profile auth problems in office 365 appear as everytime we try to sign in with their account we get a white box and cant go further.

Its quite annoying.

I have recreated profiles for years with no issue but we are wondering if something is different with version 2004, perhaps there is another step somewhere that needs to be followed since this update.

@pmgoes What version of Windows 10 are you using? Are these hardware based devices or Virtual Machines?

 

The auth issue in Office apps may be due to the Web Account Manger service not starting. 

 

Is it just these two users or are other users impacted? 

@warrenw These are 2 physical machines that both had their profiles recreated for different reasons.

They are running Win 10 Enterprise version 2004.

It is only these 2 machines as these are the only ones we have recreated user profiles for.

Its interesting that this auth window (assuming that's what it is as its blank) only started happening after the profile was recreated.

 

I will see about that service not running.

@warrenw I just confirmed the service is running as well so unfortunately thats not the cause of the white box.

 

@pmgoes Thanks for the reply. 

 

To recap 

Profiles show as "unknown" in the Control Panel app.

 

After you delete the profile using the Control Panel System The user profile directory is gone from c:\users and from the profiles list but after you delete the users profile.

 

They log back on (which recreates the profile) and notice the Recycle bin is full and Office apps are seeing a white box when they are launched. 

 

So far we do not have other reports of this behavior and I cannot reproduce the problem.  2004

 

What OS version did you upgrade from?

Are the machines in an AD domain? or Azure AD joined? 

When you reboot and logon to delete the profiles do you logon as a local admin on the workstation or use a domain account that is a local admin?

Are these virtual machines or hardware based?

Do the files in the recycle bin belong to the logged on user? If so, were they recently deleted by the user? Are they from the c: drive or another drive? 

 

It would be good to try a clean boot to see if the issue happens then.

Test if the issue reproduces on a new user on the same device. 

 

 

 

 

 

@warrenw Hi Thanks for the follow up.

They are physical machines and we were running Windows 10 Enterprise and the version was whatever is before version 2004.

We are on An AD domain that is a hybrid of Azure and Local AD, we have no roaming profiles only a folder redirect of desktop and documents. 

The files in recycle bin are users files, I am not sure of the dates and will need to check.

When we were recreating the profile we have tried it off the vpn and also on the vpn (all our staff are working remotely due to covid)

 

The account used is a local admin account.

Thanks for the advice, I would like to try another user on the same device but cant as neither user affected by this is in the office so we are doing this via Teamviewer. 

 

We are getting close to just couriering a new machine to both users though as the impact to their time is getting too high. If I used another user account remotely it would test it but it would be more interruption to the user. As we have tried recreating 2 users on two different machines I think it is likely the issue would happen with another account also.

One user is in the UK and has a new laptop now that we will setup. The other user is here in Australia but I dont think I can really do anymore testing with him. We may have to get him a new machine too.

If there is anymore things we can try on the final user I am happy to test it but think testing with other user accounts on his machine would impact him too much seeing he has already been interrupted so much.

@pmgoes 

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

@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 :) :thumbs_up:

@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? 

@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.