Create a user group command line (CMD)

by admin on August 15, 2010

We can create a user group on the local computer from Windows command line using ‘net localgroup‘ command.

net localgroup group-name /add

Example:
To add a new group ‘Group1

C:\>net localgroup Group1 /add
The command completed successfully.
C:\Documents and Settings\Techblogger>

To delete a user group:

net localgroup group-name /delete

For example to delete the user group Group1 created in the above example, we can run the below command.

net localgroup Group1 /delete

Net localgroup command can be used on the local computers whereas net group command can be used on domain controller machines.

Rename a local user group:

net localgroup command does not have any option to rename a group. We can use wmic command to rename a group. Below is the command for this.

wmic group where "name='groupname' " call rename newgroupname

Ex: Rename the group ‘group1′ as ‘group2′

wmic group where "name='group1' " call rename group2

Related Posts:
Add user to group from windows command line
Delete user from group using command prompt

{ 0 comments… add one now }

Leave a Comment

Previous post:

Next post: