Creating Users in Windows
Creating User Accounts in Windows
Through Control Panel:
- Open Control Panel.
- Go to User Accounts > Manage another account.
- Click Add a new user in PC settings.
- Choose Add someone else to this PC.
- Follow the prompts to create a new user account.
Using PowerShell:
To create a user account using PowerShell, use the following command:
New-LocalUser -Name "student1" -Password (ConvertTo-SecureString "password" -AsPlainText -Force)This creates a new local user named student1 with the specified password.
Adding Users to Groups
To add the user to a specific group, use the following PowerShell command:
Add-LocalGroupMember -Group "Users" -Member "student1"This command adds student1 to the Users group.