Net localgroup

上一篇 / 下一篇  2012-06-25 14:05:22

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

Syntax

net localgroup[GroupName[/comment:"text"]] [/domain]

net localgroup[GroupName {/add[/comment:"text"] |/delete} [/domain]]

net localgroup[GroupName name [ ...] {/add|/delete} [/domain]]

Parameters

GroupName :Specifies the name of the local group to add, expand, or delete. Used without additional parameters,net localgroup GroupNamedisplays a list of users or global groups in a local group.

/comment:"text" :Adds a comment for a new or existing group. The comment can contain up to 48 characters. Enclose the text in quotation marks.

/domain :Performs the operation on the primary domain controller of the current domain. Otherwise, the operation is performed on the local computer.

name[ ...]:Lists one or more user names or group names to add or remove from a local group.

/add :Adds a global group name or user name to a local group. You must first establish an account for users or global groups before you can add it to a local group with this command.

/delete :Removes a group name or user name from a local group.

net help command :Displays help for the specifiednetcommand.

Remarks

  • Using/domain 

    /domainapplies only to Windows XP Professional computers that are members of a domain. By default, server computers perform. operations on the primary domain controller.

  • Usingname 

    Separate multiple entries with a space. Names can be local users, users on other domains, or global groups, but not other local groups. If a user is from another domain, preface the user name with the domain name (for example, Sales\Ralphr).

  • Grouping users

    Usenet localgroupto group users who use the computer or network in the same or similar ways. When you assign rights to a local group, each member of the local group automatically has the same rights.

Examples

To display a list of all the local groups on the local server, type:

net localgroup

To add a local group called Exec to the local user accounts database, type:

net localgroup exec /add

To add a local group called Exec to the domain user accounts database, type:

net localgroup exec /add /domain

To add 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

To add the existing user accounts stevev, ralphr, and jennyt to the Exec group of a domain, type:

net localgroup exec stevev ralphr jennyt /add /domain

To display users in the Exec local group, type:

net localgroup exec

To add a comment to the Exec local group record, type:

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

 

TAG:

 

评分:0

我来说两句

Open Toolbar