Exportar (0) Imprimir
Expandir Todos
Arp
At
Cd
Cls
Cmd
Del
Dir
Fc
For
Ftp
If
Ldp
Lpq
Lpr
Md
Mmc
Msg
Nlb
Rcp
Rd
Reg
Rem
Ren
Rsh
Rsm
Rss
Sc
Set
Sfc
Ver
Vol
Expand Minimize

Net localgroup

Actualizado: Abril de 2012

Aplica-se a: 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.

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

<GroupName>
Specifies the name of the local group to add, expand, or delete. Used without additional parameters, net localgroup <GroupName> displays 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 256 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 specified net command.

  • Using /domain

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

  • Using Name

    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

    Use net localgroup to 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.

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

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."

Considera isto útil?
(1500 caracteres restantes)
Obrigado pelos seus comentários

Conteúdo da Comunidade

Adicionar
Mostrar:
© 2014 Microsoft