How To Use The Net Localgroup Command In Windows (2026)
Net localgroup is a Windows command for creating local groups and managing who belongs to them.
It lists groups, shows members, and adds or removes users from the command line.
This guide follows the syntax and examples Microsoft documents.
Table of Contents
- Net localgroup quick answer
- What the net localgroup command does
- A note on the Microsoft page
- Why use groups
- Before you start
- List local groups
- Show who is in a group
- Create a local group
- Add users to a group
- Remove a user or delete a group
- Add a comment to a group
- All net localgroup parameters
- Syntax forms
- When to use /domain
- Microsoft’s examples
- Common mistakes
- Related guides
- Sources
- More Windows guides
Net localgroup quick answer
Run net localgroup in Command Prompt to list the local groups on the computer.
Add a group name to see its members, or add /add or /delete to change groups and membership.
| Goal | Command |
|---|---|
| List all local groups | net localgroup |
| Show the members of a group | net localgroup exec |
| Create a group | net localgroup exec /add |
| Add users to a group | net localgroup exec stevev jennyt /add |
| Remove a user from a group | net localgroup exec stevev /delete |
| Add a comment to a group | net localgroup exec /comment:"The executive staff." |
| Delete a group | net localgroup exec /delete |
What the net localgroup command does
Microsoft says net localgroup adds, displays or modifies local groups.
Used without parameters, it displays the name of the server and the names of the local groups on the computer.
Use it to group users who use the computer or network in the same or similar ways.
When you assign rights to a local group, each member automatically has the same rights.
A note on the Microsoft page
The current Microsoft Learn page for this command was not available when this guide was written, so it follows Microsoft’s archived net localgroup page, last updated on 2016-08-31.
That page lists Windows Server 2008, Windows Server 2012 and Windows 8 as the systems it applies to.
Test any change on a PC you can afford to fix before you rely on it.
Why use groups
Groups save time because you assign rights to the group once.
Every member then automatically has the same rights.
Adding a person to the group gives them those rights, and removing them takes the rights away.
That is why Microsoft recommends grouping users who use the computer or network in similar ways.
Before you start
- Select Start and type Command Prompt.
- Open the Command Prompt result.
- Type the command you need and press Enter.
The example group name exec comes from Microsoft’s page, so replace it with your own group.
List local groups
Type the command with no parameters to display all local groups on the computer.
net localgroup
Show who is in a group
Used with just a group name, the command displays the users or global groups in that local group.
net localgroup exec
Create a local group
The /add parameter after a group name adds a local group to the local user accounts database.
net localgroup exec /addAdding /domain performs the operation on the primary domain controller of the current domain instead.
Add users to a group
Put one or more user names after the group name and finish with /add.
Separate entries with a space.
Microsoft says you must first have an account for a user or global group before you can add it to a local group.
net localgroup exec stevev sales\ralphr jennyt /addFor a user from another domain, put the domain name first, as in Sales\Ralphr.
Names can be local users, users on other domains or global groups, but not other local groups.
Remove a user or delete a group
The /delete parameter removes a group name or user name from a local group, and used on a group name by itself it deletes the group.
| Goal | Command |
|---|---|
| Remove a user from a group | net localgroup exec stevev /delete |
| Delete the group itself | net localgroup exec /delete |
List the members first so you remove the right account.
Add a comment to a group
The /comment parameter adds a comment to a new or existing group.
The comment can contain up to 256 characters and goes in quotation marks.
net localgroup exec /comment:"The executive staff."
All net localgroup parameters
| Parameter | What it does |
|---|---|
| GroupName | The local group to add, expand or delete |
| /comment:”Text” | Adds a comment of up to 256 characters |
| /domain | Runs on the primary domain controller of the current domain |
| Name […] | One or more users or groups to add or remove |
| /add | Adds a group, or adds names to a group |
| /delete | Removes a name from a group, or deletes a group |
| net help Command | Shows help for the named net command |
Syntax forms
Microsoft documents three forms of the command.
| Form | Use |
|---|---|
net localgroup [GroupName [/comment:"Text"]] [/domain] | List groups, show members or comment |
net localgroup GroupName {/add [/comment:"Text"] | /delete} [/domain] | Add or delete a group |
net localgroup GroupName Name [...] {/add | /delete} [/domain] | Add or remove members |
When to use /domain
Microsoft says /domain applies only to computers that are members of a domain.
By default, server computers perform operations on the primary domain controller.
Without it, the operation is performed on the local computer.
Microsoft’s examples
Microsoft lists these examples, all using a group called Exec.
| Task | Command |
|---|---|
| Display all local groups on the local server | net localgroup |
| Add the Exec group to the local user accounts database | net localgroup exec /add |
| Add the Exec group to the domain user accounts database | net localgroup exec /add /domain |
| Add stevev, ralphr (from the Sales domain) and jennyt to Exec on the local computer | net localgroup exec stevev sales\ralphr jennyt /add |
| Add stevev, ralphr and jennyt to the Exec group of a domain | net localgroup exec stevev ralphr jennyt /add /domain |
| Display the users in Exec | net localgroup exec |
| Add a comment to the Exec group | net localgroup exec /comment:"The executive staff." |
Common mistakes
- Adding a name that has no account yet, because Microsoft says the account must exist first.
- Trying to add one local group to another, because names can be users or global groups but not local groups.
- Leaving out the domain name for a user from another domain, as in Sales\Ralphr.
- Forgetting quotation marks around a comment.
- Typing a comment longer than 256 characters.
If a command fails, run net help localgroup to see the built-in help for it.
Related guides
Create the users you want to add with our Net User command guide.
To connect to a shared folder on another PC, see our Net Use command guide.
If a group policy change has not applied yet, our Gpupdate command guide shows how to refresh Group Policy.
Sources
Microsoft Learn (archived): Net localgroup.
Microsoft Learn: Windows commands.
More Windows guides
- How To Install .NET Framework 3.5 On Windows 11 (2026)
- How To Uninstall ESET From Windows Step By Step (2026)
- How To Uninstall Kaspersky Completely From Windows (2026)
- Local Security Authority Protection Is Off In Windows 11 (2026)
- How To Use Ping And Tracert In Windows 11 (2026)
- How To Change UAC Settings In Windows 11 (2026)
See all: Windows 11 Guides