Deleting a user account in Windows 10
In Windows 10 there are multiple ways of deleting user accounts. You can do it the old-fashioned way using the Control Panel, you can use the new Settings App. In the case of local accounts, you can also use PowerShell. Let us take a look at these options.
Using Control Panel in non-categorized view
If you have set the Control Panel to large icons or small icons view then follow the instructions in this section.
- Launch Control Panel
- User Accounts
- Manage another account
- Click on the account you want to delete
- Click Delete the account link.
Next, you have a choice to make. Choose the keep-files option if you want Windows to make a copy of the personal files of the account before it is deleted. Choose the delete-files option if you are okay with deleting all files. Click Delete account
Using the Control Panel in the categorized view
If the Control Panel is in categorized view, the default view, follow the instructions in this section.
- Launch Control Panel
- User Accounts
- Remove user accounts
- click on the account you want to delete
- Delete the account.
Next, you have a choice to make. Choose the keep-files option if you want Windows to make a copy of the personal files of the account before it is deleted. Choose the delete-files option if you are okay with deleting all files. Click Delete account
Using the Settings App
- Launch Windows Settings
- Accounts
- Family & other people
- Click on the account you want to delete
- Click Remove
You will get a warning saying that deleting the account would also delete all the account’s data. If you are okay with it click “Delete account and data”.
Delete local account using PowerShell
The Remove-LocalUser PowerShell cmdlet can be used to delete local accounts. Please note that this does not work with Microsoft accounts. Some basic examples of remove-localuser cmdlet are given below. For more advanced options please see the documentation for the cmdlet.
1# remove local account named User1
2Remove-LocalUser -name "User1"
3
4# removing multiple users
5$accounts="User1","User2"
6Remove-LocalUser -name $accounts