1 votes
Remove User Profile correctly
in Windows 10
Net User Command Add, Delete, Edit User Account
Net user command line is a built-in Windows Command tool. It use for creating, deleting and managing user account in Windows operating system. To run this command, open a command prompt (Win+R) to open Run and type cmd then press enter. It is the command prompt command line tools but work with new command line PowerShell environment also. Remember If you want to execute net user to add new user or bring changes, you must run cmd or Poershell as administrators. It is not work as standard users.
Net User Command line Structure
To understand the structures of a command, get the help by typing /? on cmd. It will show you the help documents.
PS C:\> net user /?
The syntax of this command is:NET USER
[username [password | *] [options]] [/DOMAIN]
username {password | *} /ADD [options] [/DOMAIN]
username [/DELETE] [/DOMAIN]
username [/TIMES:{times | ALL}]
username [/ACTIVE: {YES | NO}]PS C:\>
Add a New user Using Net User Command
Let’s start and create a new user, named Ali with Password 123, and press enter.
PS C:\Windows\system32> net user /add ali 123
The command completed successfully.
The user Ali has created successfully. If it issues the Access denied errors, it means that the command prompt is running as standard user. like bellow errors.
PS C:\Users\Shais> net user khan /add
System error 5 has occurred.Access is denied.
To view the complete information of newly created user, type net user ali and press enter. It will show you the user local group membership, Global group membership and date of creation or etc.
PS C:\Windows\system32> net user ali
User name ali
Full Name
Comment
User’s comment
Country/region code 000 (System Default)
Account active Yes
Account expires NeverPassword last set 3/21/2015 4:13:26 PM
Password expires 5/2/2015 4:13:26 PM
Password changeable 3/21/2015 4:13:26 PM
Password required Yes
User may change password YesWorkstations allowed All
Logon script
User profile
Home directory
Last logon NeverLogon hours allowed AllLocal Group Memberships *Users
Global Group memberships *None
The command completed successfully.PS C:\Windows\system32>
Adding User to a Group
Now you have created a new user successfully and now try to add this user to a group. Add to administrators group in order to give him more permission. On the user information you saw that Ali is only member of Users group which is a standard group. With a standard user you can not bring any changes to Windows.
You can add a user to a group with Net Localgroup command.
To remove a user group membership, type the following command and press enter
PS C:\Windows\system32> net localgroup administrators ali /add
The command completed successfully.
Change User’s Password with Net User Command
Sometime you want to change a user’s password by command. So try to test with net user command, it is simple and easy. Just type “net user ali pass123″
PS C:\Windows\system32> net user ali pass123
The command completed successfully.
It can change with other method as well. Type “net user ali *” and press enter. Now type the password twice and press enter. In this mode no one can see the password.
Delete a User with Net User Command
If you don’t need a user any more, don’t left it away. Delete it or disable it for security reasons. Someone might crack the password and log in to your system. To delete a user type “net user ali /delete”.
Note: When you delete a user through net user command line, the profile’s of the user remain in the users profiles folder. You must delete it manually or form user profiles setting. Read this article “Remove User Profile correctly in Windows 10”
Hope you find it helpful and do it like a IT experts. If you have any problem or question about the articles, feel free and ask through comment.
0 comments:
Post a Comment