Net localgroup


Applies To: Windows Server 2008

Adds, displays, or modifies local groups. Used without parameters, net localgroup displays the name of the server and the names of local groups on the computer.

Net localgroup is a command-line tool that is built into Windows Vista. To run net localgroup, open a command prompt, type net localgroup with the appropriate parameters, and then press ENTER.

For examples of how to use this command, see Examples.

Syntax


Copy Code

net localgroup [<GroupName> [/comment:"<Text>"]] [/domain]
net localgroup [<GroupName> {/add [/comment:"<Text>"] | /delete} [/domain]
net localgroup [<GroupName> <Name> […] {/add |  /delete} [/domain]

Parameters








Remarks <optional section>

Examples

The following example displays a list of all the local groups on the local server, type:


Copy Code

net localgroup

The following example adds a local group called Exec to the local user accounts database, type:

net localgroup exec /add

The following example adds a local group called Exec to the domain user accounts database, type:

net localgroup exec /add /domain

The following example adds the existing user accounts stevev, ralphr (from the Sales domain), and jennyt to the Exec local group on the local computer, type:

net localgroup exec stevev sales\ralphr jennyt /add

The following example adds the existing user accounts stevev, ralphr, and jennyt to the Exec group of a domain, type:

net localgroup exec stevev ralphr jennyt /add /domain

The following example displays users in the Exec local group, type:

net localgroup exec

The following example adds a comment to the Exec local group record, type:

net localgroup exec /comment:"The executive staff."

Additional references

Command-Line Syntax Key