The local group admin command refers to the command-line tools used on Windows to manage local user groups — creating them, adding or removing members, renaming, and deleting them. The most common tool is net localgroup, with PowerShell’s New-LocalGroup, Add-LocalGroupMember and related cmdlets as the modern alternative. This guide shows you how to use both safely, from an elevated prompt.
What You’ll Need
- A Windows PC where you can sign in with an account that is a member of the local Administrators group.
- Administrator rights: you must open Command Prompt or PowerShell as administrator. Without elevation, group changes fail with an access-denied message.
- The exact names of the user accounts or groups you plan to add or remove. Check spelling first; a typo creates a wrong entry or an error.
- Optional: a quick note of the current group membership before you change anything, so you can undo mistakes.
Step-by-Step
- Open an elevated prompt. Press the Start button, type
cmdorpowershell, right-click the result, and choose Run as administrator. Accept the User Account Control prompt. The window title should show that it is elevated. - List the existing local groups. In Command Prompt, run
net localgroup. This prints every local group on the machine. In PowerShell you can runGet-LocalGroupfor a cleaner table. - Inspect a group before changing it. Run
net localgroup "GroupName"(for example,net localgroup "Remote Desktop Users"). The output lists current members and any comment. Note who is already there. - Create a new local group. In Command Prompt:
net localgroup "NewGroupName" /add. Add a comment if you like with/comment:"description". In PowerShell:New-LocalGroup -Name "NewGroupName" -Description "description". - Add a member. Command Prompt:
net localgroup "GroupName" UserName /add. To add a domain account, useDomain\UserName. PowerShell:Add-LocalGroupMember -Group "GroupName" -Member "UserName". You can add several members in one PowerShell call by listing them after-Member. - Remove a member. Command Prompt:
net localgroup "GroupName" UserName /delete. PowerShell:Remove-LocalGroupMember -Group "GroupName" -Member "UserName". Removing a user from a group does not delete the user account. - Rename or delete a group. Rename in Command Prompt with
net localgroup "OldName" /rename(the tool prompts for the new name), or in PowerShell withRename-LocalGroup -Name "OldName" -NewName "NewName". Delete withnet localgroup "GroupName" /deleteorRemove-LocalGroup -Name "GroupName". Deleting a group removes its membership list but leaves the user accounts intact. - Verify the result. Run the listing command again:
net localgroup "GroupName"orGet-LocalGroupMember -Group "GroupName". Confirm the members are exactly what you intended. - Test access if the group controls permissions. If you added someone to a group that grants access to a resource, have that user sign out and back in, then try the resource. Group membership is read at sign-in for many access checks, so a fresh session is the reliable test.
Common Mistakes
- Running without elevation. The command runs but returns "Access is denied" or "System error 5". Always use an administrator prompt.
- Wrong group name. Built-in groups have exact names such as
AdministratorsandUsers. Quoting the name helps with spaces, but spelling still matters. Usenet localgroupto copy the exact name. - Confusing local and domain accounts. A local group can hold domain accounts, but you must supply the domain prefix. Without it, Windows may look only at the local machine and fail to find the user.
- Deleting instead of removing.
/deleteon a group destroys the group; to remove one person, use the member name with/deleteafter the group name. Read the command order carefully. - Assuming changes apply instantly everywhere. Some services and sessions cache group membership. Sign out and back in, or restart the relevant service, before concluding the change failed.
- Editing built-in groups casually. Removing accounts from
Administratorscan lock you out of administrative tools. Keep at least one working admin account.
Tips
- Prefer PowerShell for repeatable work: you can pipe a list of names into
Add-LocalGroupMemberand script changes consistently. - Record the "before" membership output in a text file before bulk changes. It is the fastest undo reference.
- Use
/?after any command (for example,net localgroup /?) to see the exact syntax your Windows version supports. - Keep group names descriptive and stable; renaming a group can break scripts that reference the old name.
- For one-off checks,
whoami /groupsshows the groups your current session belongs to, which helps confirm whether a change has taken effect for you.
Troubleshooting
- "Access is denied" or system error 5: the prompt is not elevated. Close it and reopen as administrator.
- "The specified local group does not exist": the group name is misspelled or the group was deleted. List groups again and copy the name exactly.
- "The specified account name is not a member" when deleting: the user is not in that group, or the name differs (for example, a domain account versus a local one). Check the current membership first.
- "The account name could not be found": the user account does not exist on this machine or in the reachable domain. Confirm the account exists and use the correct prefix.
- Changes seem not to work: sign out and back in, or reboot, then recheck with the listing command. If a policy manages local groups centrally, your manual change may be overwritten at the next policy refresh; in that case, change the policy instead.
- PowerShell cmdlets are missing: the LocalAccounts module may be unavailable on some editions. Use
net localgroupinstead, or check that you are on a supported Windows version.
Frequently Asked Questions
Do I need administrator rights to list groups? Listing usually works for standard users, but any change requires elevation. If a listing command fails, try an elevated prompt.
What is the difference between net localgroup and PowerShell cmdlets? Both manage the same local groups. The net command works across Windows versions and is quick for one-off changes; PowerShell cmdlets return objects and are easier to script.
Can I add a domain user to a local group? Yes. Supply the account with its domain prefix, for example Domain\UserName. The machine must be able to contact the domain to resolve the name.
Does removing a user from a group delete their account? No. Group membership and user accounts are separate. Removing membership only changes access; the account remains.
Why did my change disappear after a restart? A domain policy or management tool may enforce group membership and reset it. Check with your administrator or review applied policies.
How do I undo a change? Reverse the command: if you added a member, remove them; if you created a group, delete it. Having the earlier listing output makes this straightforward.