Windows Server 2008 For Dummies
Book image
Explore Book Buy On Amazon

The Net Group command lets you add, display, or change global groups in a Windows Server 2008 environment. This command has a number of different syntaxes, depending on how you intend to use it.

To display information about a group or to change a group’s comment, use this syntax:

net group <i>groupname</i> [/comment:"<i>text"</i>] [/domain]

To create a new group, use this syntax:

net group <i>groupname</i> /add [/comment:"<i>text"</i>] [/domain]

To delete a group, use this syntax:

net group <i>groupname</i> /delete [/domain]

Finally, to add or remove users from a group, use this syntax:

net group <i>groupname</i> <i>username</i>[ ...] {/add | /delete} [/domain]

The following paragraphs describe the parameters that you can use with the Net Group command:

  • Groupname: The name of the group to add, change, or delete. If you specify this parameter and no others, a list of users in the group appears.

  • Comment: Specifies a comment for the group. The comment can be up to 48 characters in length and should be enclosed in quotation marks.

  • Domain: Specifies that the operation should be performed on the primary domain controller rather than on the local computer.

  • Add: Creates a new group or adds users to an existing group. Before you add a user to a group, you must first create a user account for the user.

  • Delete: Removes a group or removes users from the group.

  • Username: One or more usernames to be added to or removed from the group. If you list more than one name, separate the names with spaces.

Windows isn’t picky: You can specify Net Groups rather than Net Group if you want.

This example lists all the groups on a server:

C:>net group

This example adds a group named Admin:

C:>net group Admin /add

This example adds three users to the Admin group:

C:>net group Admin Ward Wally June /add

This example lists the users in the Admin group:

C:>net group Admin

About This Article

This article can be found in the category: