Windows 10 How to Delete user profile after sign out

Hi,

We have a conference room that has a command PC which connects to a TV for people to do presentations, Skype calls, etc etc,. Ideally, I would set one user profile that everyone can use to log into it but due to certain circumstances, we have to let our every user log in the PC every time with their own username and credential.

We have 100s of the user at the moment I see more than 50 user profiles has already created in C:\Users. This has caused slow down to the PC because Windows has to set up certain things for the every user profile which will take the certain amount of storage also.

So, I need a way to delete the user profile after the user sign out the system each time. I would like to know if what others are doing similar to these situations and if there are any other good setups to accomplish what we’re attempting.
Thank you!

Hello @AnthonyD

I hope this link would help you.

2 Likes

In Windows, there is a built-in Group Policy to automatically delete user profiles older than xx days. You can find the policy Delete user profiles older than a specified number days on system restart in the GPO section Computer Configuration -> Administrative Templates -> System -> User Profiles . You can enable this policy in the Local Group Policy Editor (gpedit.msc) or using domain policies in GPMC.msc.

Enable the policy and specify the number of days a user profile is considered active. When this period is over, Windows user profile service will automatically delete the profile at the next restart. It is recommended to specify the period of 45-90 days here.

group-policy-delete-user-profiles-older-than-a-sp-999tech

2 Likes

Thank you both @VIkasmadan, @tjnihal.

It was very helpful information you have shared. I never thought there will be a easy to achieve this. Thank you very much.

2 Likes
  1. Press Win + R hotkeys on the keyboard. The Run dialog will appear on the screen. …
  2. Advanced System Properties will open. …
  3. In the User Profiles window , select the profile of the user account and click the Delete button.
  4. Confirm the request, and the profile of the user account will now be deleted.

for a detailed answer , go to this link

OPTION ONE

To Delete User Profile of an Account in Advanced System Properties

1. If you haven’t already, you will need to make sure that the user account (ex: “Example”) you want to delete the profile of is signed out before continuing.

2. Press the Win+R keys to open Run, type SystemPropertiesAdvanced.exe , and click/tap on OK to open advanced System Properties.

3. Click/tap on the Settings button under User Profiles . (see screenshot below)

Delete User Profile in Windows 10-delete_user_profile_system_properties-1.png

4. Select the profile of the user account (ex: “Example”), and click/tap on Delete . (see screenshot below)

Delete User Profile in Windows 10-delete_user_profile_system_properties-2.png

5. Click/tap on Yes to confirm. (see screenshot below)

Delete User Profile in Windows 10-delete_user_profile_system_properties-3.png

6. The profile of the user account (ex: “Example”) will now be deleted. A new profile for the user’s account will automatically be created the next time that user signs in . (see screenshot below)

Delete User Profile in Windows 10-delete_user_profile_system_properties-4.png

7. You can now close the User Profiles and System Properties windows if you like.

OPTION TWO

To Delete User Profile of an Account in File Explorer and Registry Editor

1. If you haven’t already, you will need to make sure that the user account (ex: “Example”) you want to delete the profile of is signed out before continuing.

2. Open the C:\Users folder in File Explorer, and delete the profile folder (ex: “Example”) of the user account you want. (see screenshot below)

Delete User Profile in Windows 10-manually_delete_user_profile_in_file_explorer-1.png

3. Click/tap on Continue to approve. (see screenshot below)

Delete User Profile in Windows 10-manually_delete_user_profile_in_file_explorer-2.png

4. The user profile folder (ex: “Example”) of the account will now be deleted. You can now close File Explorer. (see screenshot below)

Delete User Profile in Windows 10-manually_delete_user_profile_in_file_explorer-3.png

5. Press the Win+R keys to open Run, type regedit , and click/tap on OK to open Registry Editor.

6. Navigate to the ProfileList key in the left pane of Registry Editor at the location below. (see screenshot below)

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

Delete User Profile in Windows 10-manually_delete_user_profile_in_file_explorer-4.png

7. Look at the value data for the ProfileImagePath value name in the right pane of each SID key (S-1-5-21…long number) under the ProfileList key in the left pane to find the SID key that belongs to the user profile (ex: “Example”) you want to delete. (see screenshot above)

8. When you find the correct SID key (ex: "S-1-5-21… 1007 ") in the left pane, right click or press and hold on this SID key (ex: "S-1-5-21… 1007 "), and click/tap on Delete .

9. Click/tap on Yes to confirm deleting the profile’s reference in the registry. (see screenshot below)

Delete User Profile in Windows 10-manually_delete_user_profile_in_file_explorer-5.png

10. The profile of the user account (ex: “Example”) will now be deleted. A new profile for the user’s account will automatically be created the next time that user signs in .

11. You can now close Registry Editor if you like.

I second the suggestion given by @tjnihal.

If you are on domain environment then GPO is the best way to achive this. Remember by appling this settings you will have no option to exclude options. Which means all the users will be deleted once it reach the certain period specified by you.

If the PC is not in the domain you can achive this using local group policy setting in any of the Windows 10 device. Just search for group policy editor on Windows 10 and follow the instruction given by nihal above.

Let us know if you have any comments in this quaries.

Above is valuable information shared by other users that can help on this subject. Additionally, I found the following information that will also be helpful to the readers.

Additional Methods for Deleting User Profiles:

  1. Using Netplwiz:
  • Open the Run dialog by pressing Win + R on your keyboard.
  • Type “netplwiz” and press Enter to open the User Accounts window.
  • Select the user profile you wish to delete.
  • Check the box next to “Delete user data for this account.”
  • Click “Apply” to confirm the deletion.
  1. Using PowerShell:
  • Open PowerShell as an administrator.
  • Type the following command, replacing <username> with the actual username of the profile you want to delete:
Remove-Profile -ProfilePath "C:\Users\<username>"
  • Press Enter to execute the command.

Important Warnings and Considerations:

  1. Data Loss:
  • Deleting a user profile will result in the permanent removal of all associated data, including documents, pictures, music, settings, and preferences.
  • Prior to deleting a user profile, it’s crucial to back up any essential data to prevent loss.
  1. Registry Editing:
  • The manual method involving Registry Editor should be approached with caution.
  • Incorrect registry edits can lead to significant system problems, making it suitable primarily for advanced users experienced in registry management.
  1. Local Group Policy:
  • The Local Group Policy method is applicable exclusively to local user accounts and does not affect domain accounts.
  • It is important to note that domain accounts may require different procedures for profile management.

I hope this information is helpful! Please feel free to ask any questions you may have.