Link to home
Start Free TrialLog in
Avatar of Gibo
Gibo

asked on

What is the correct way to delete a user's profile in Windows Server 2016? & why do we delete them?

What is the correct way to delete a user's profile in Windows Server 2016? & why do we delete them?

Is it to clear the user's login cache or corrupt credentials? Etc.?
Avatar of Hello There
Hello There

What is the correct way to delete a user's profile in Windows Server 2016?
1. Run netplwiz.exe and delete the user profile
2. Remove C:\Users\username folder
3. Delete corresponding registry key under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList                                  

why do we delete them?
You usually delete them as a clean up process of the user that left the company + to get some disk space
ASKER CERTIFIED SOLUTION
Avatar of Seth Simmons
Seth Simmons
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Gibo

ASKER

Is deleting a user's profile will help resolve some login issues when a user was accidentally deleted in active directory & then re-created w/ the same user name?

Please advise, thanks.
it can
if a user was deleted and created again with the same username and their old user profile is present, i would expect the new account to have a profile folder named user.001 since the folder named user already exists

Avatar of Gibo

ASKER

Noted w/ thanks.
Avatar of Gibo

ASKER

Or sometimes I see that it appends a suffix ~ domain name in the user's account login name in Windows
that's because there is a local account with the same username
if the local administrator account is used, then the profile will be named administrator
login as the domain administrator, the folder name will be administrator.domain 
If you create a local user called TestUser and you log in with this account first, the "C:\Users\TestUser" folder will be created.
Then, if you create a domain user called TestUser, the "C:\Users\TestUser.domainname" will be created.

If you reverse it:
If you create a domain user called TestUser2 and you log in with this account first, the "C:\Users\TestUser2" folder will be created.
Then, if you create a local user called TestUser, the "C:\Users\TestUser2.computername" will be created.
Avatar of Gibo

ASKER

noted, tnx
Avatar of Gibo

ASKER

appreciate all your feedback, makes all things clearer why we're having these login issues
Avatar of Gibo

ASKER

*** if the user’s profile is deleted, will it also remove or delete all the files, folders, desktop etc. in the server or PC?
Local user data are deleted = all under C:\Users\testuser (C:\Users\testuser\Desktop, C:\Users\testuser\Documents, C:\Users\testuser\Downloads, C:\Users\testuser\Pictures, etc.).
Avatar of Gibo

ASKER

perhaps make a backup of data before deleting a corrupt user’s profile
Sure if you feel you might need them.
It’s been a while since I did this, but it’s either part of SCCM Tools, or the SCCM add-on “one-click” tools that does it all for you
It lists all the profiles and deletes the profile and the registry entry with a click of the mouse button
Avatar of Gibo

ASKER

unfortunately we don't have an SCCM in our environment