Open & Manage Local User and Group Management
Windows 11/10 Pro, Enterprise, etc. versions offer programs like lusrmgr.msc, Netplwiz, and even userpasswords2 programs that allow managing users and groups. Windows 11/10Home users with admin privileges can use Command Line Interfaces such as NET LOCALGROUP and Microsoft.PowerShell.LocalAccounts to do the same thing.
How to use Net LocalGroup
Here is the complete syntax for this command which you can run over elevated Command Prompt When you run only “Net Localgroup” it will list all the groups in the Windows 10 PC.
1] Add a user with and without domain
2] Create a new group
3] List all users in a group
4] Remove a user from a group
5] Delete a user from a group
PowerShell LocalAccounts Module
PowerShell offers a LocalAccount module which provides 15 cmdlets to manage Windows Users, and Groups. Here is the list:
Add-LocalGroupMember — Add a user to the local groupDisable-LocalUser —Disable a local user accountEnable-LocalUser — Enable a local user accountGet-LocalGroup — View local group preferencesGet-LocalGroupMember — View the list of all local group membersGet-LocalUser — View a local user account’s preferencesNew-LocalGroup — Create a new local groupNew-LocalUser — Create a new local user accountRemove-LocalGroup — Remove a local groupRemove-LocalGroupMember — Remove a member from a local groupRemove-LocalUser — Remove a local user accountRename-LocalGroup — Rename a local groupRename-LocalUser — Rename a local user accountSet-LocalGroup — Change the settings of a local groupSet-LocalUser — Change the account settings of a local user
So if you want to create a new local group, execute the following command To remove a member from a group, run this command: Using both NET LOCALGROUP and Microsoft.PowerShell.LocalAccounts interface, you can manage users and groups easily. These commands are easy to use, but if you want a software-based approach, then try the Lusrmgr tool.