Net Localgroup Command
This command allows system administrators to manage the local groups and users, one can display, modify add, and remove the groups and users, this article explains how to use this command with the right parameters.
Net Localgroup Syntax
net localgroup [<GroupName> <Name> {/add | /delete} [/domain]
How to Create a local group
net localgroup /add groupname
You need to repalce the keyworkd groupname with your specified group name, in my case i’m creating a group name called MSTEST.
net localgroup /add MSTEST
How to Add a user to a local group
net localgroup groupname username /add
The above example is for adding a user to group on the local computer, you need to replace the groupname and username with your specified group and user name.
net localgroup MSTEST RAJA/add
In my case I have added a user raja to a local group MSTEST, it is that simple with net local group command.
How to add a domain group to local group
net localgroup GroupName domainGroupName /ADD
One can also add active directory domain group to local group, in most cases administrators add their domain group to the local administrator group on the servers or desktop machine to manage the computers.
net localgroup administrator hubdomain/mstest /ADD
The above command adds the domain group to the local administrators group.
How to List all local groups
Open the command prompt and type net localgroup and hit enter to list all local groups on the computer.
C:\Users\Raj>net localgroup Aliases for \\DESKTOP-SV9FFDSF3Q ------------------------------------------------------------------------------- *Access Control Assistance Operators *Administrators *Backup Operators *Cryptographic Operators *Device Owners *Distributed COM Users *Event Log Readers *Guests *Hyper-V Administrators *IIS_IUSRS *Network Configuration Operators *Performance Log Users *Performance Monitor Users *Power Users *Remote Desktop Users *Remote Management Users *Replicator *System Managed Accounts Group *Users The command completed successfully.
How to remove a user from a local group
net localgroup groupname username /delete
Leave a Reply Cancel reply