http://technet2.microsoft.com/Window....mspx?mfr=true

dsadd /? - help for adding objects.
dsget /? - help for displaying objects.
dsmod /? - help for modifying objects.
dsmove /? - help for moving objects.
dsquery /? - help for finding objects matching search criteria.
dsrm /? - help for deleting objects.


DSMOD GROUP

Description: Modifies an existing group in the directory.

Syntax: dsmod group <GroupDN ...> [-samid <SAMName>]
[-desc <Description>] [-secgrp {yes | no}] [-scope {l | g | u}]
[{-addmbr | -rmmbr | -chmbr} <Member ...>]
[{-s <Server> | -d <Domain>}] [-u <UserName>]
[-p {<Password> | *}] [-c] [-q] [{-uc | -uco | -uci}]

Parameters:
Value Description
<GroupDN ...> Required/stdin. Distinguished names (DNs) of
one or more groups to modify.
If target objects are omitted they
will be taken from standard input (stdin)
to support piping of output from another command
to input of this command.
If <GroupDN ...> and <Member ...> are used
together then only one parameter can
be taken from standard input, requiring that at
least one parameter be specified on the command line.
-samid <SAMName> Sets the SAM account name of group to <SAMName>.
-desc <Description> Sets group description to <Description>.
-secgrp {yes | no} Sets the group type to security (yes)
or non-security (no).
-scope {l | g | u} Sets the scope of group to local (l),
global (g), or universal (u).
{-addmbr | -rmmbr | -chmbr}
-addmbr adds members to the group.
-rmmbr removes members from the group.
-chmbr changes (replaces) the complete list of
members in the group.
<Member ...> Space-separated list of members to add to,
delete from, or replace in the group.
If target objects are omitted, they
will be taken from standard input (stdin)
to support piping of output from another command
to input of this command.
The list of members must follow the
-addmbr, -rmmbr, and -chmbr parameters.
If <GroupDN ...> and <Member ...> are used
together then only one parameter can
be taken from standard input, requiring that at
least one parameter be specified on the command line.
{-s <Server> | -d <Domain>}
-s <Server> connects to the domain controller (DC)
with name <Server>.
-d <Domain> connects to a DC in domain <Domain>.
Default: a DC in the logon domain.
-u <UserName> Connect as <UserName>. Default: the logged in user.
User name can be: user name, domain\user name,
or user principal name (UPN).
-p <Password> Password for the user <UserName>. If * then prompt
for password.
-c Continuous operation mode. Reports errors but
continues
with next object in argument list when multiple
target objects are specified. Without this option,
the command exits on first error.
-q Quiet mode: suppress all output to standard output.
{-uc | -uco | -uci} -uc Specifies that input from or output to pipe is
formatted in Unicode.
-uco Specifies that output to pipe or file is
formatted in Unicode.
-uci Specifies that input from pipe or file is
formatted in Unicode.

Remarks:
If a value that you supply contains spaces, use quotation marks
around the text
(for example, "CN=USA Sales,OU=Distribution Lists,DC=microsoft,DC=com").
If you enter multiple values, the values must be separated by spaces
(for example, a list of distinguished names).

Examples:
To add the user Mike Danseglio to all administrator
distribution list groups:

dsquery group "OU=Distribution Lists,DC=microsoft,DC=com" -name adm* |
dsmod group -addmbr "CN=Mike Danseglio,CN=Users,DC=microsoft,DC=com"

To add all members of the US Info group to the Cananda Info group:

dsget group "CN=US INFO,OU=Distribution Lists,DC=microsoft,DC=com" -members |
dsmod group "CN=CANADA INFO,OU=Distribution Lists,DC=microsoft,DC=com"
-addmbr

To convert the group type of several groups from "security" to
"non-security":

dsmod group "CN=US INFO,OU=Distribution Lists,DC=microsoft,DC=com"
"CN=CANADA INFO,OU=Distribution Lists,DC=microsoft,DC=com"
"CN=MEXICO INFO,OU=Distribution Lists,DC=microsoft,DC=com" -secgrp no

To add three new members to the US Info group:

dsmod group "CN=US INFO,OU=Distribution Lists,DC=microsoft,DC=com" -addmbr
"CN=John Smith,CN=Users,DC=microsoft,DC=com"
"CN=Datacenter,OU=Distribution Lists,DC=microsoft,DC=com"
"CN=Jane Smith,CN=Users,DC=microsoft,DC=com"

To add all users from the OU "Marketing" to the exisitng group
"Marketing Staff":

dsquery user ou=Marketing,dc=microsoft,dc=com | dsmod group
"cn=Marketing Staff,ou=Marketing,dc=microsoft,dc=com" -addmbr

To delete two members from the exisitng US Info group:

dsmod group "CN=US INFO,OU=Distribution Lists,DC=microsoft,DC=com" -rmmbr
"CN=John Smith,CN=Users,DC=microsoft,DC=com"
"CN=Datacenter,OU=Distribution Lists,DC=microsoft,DC=com"

See also:
dsmod computer /? - help for modifying an existing computer in the directory.
dsmod contact /? - help for modifying an existing contact in the directory.
dsmod group /? - help for modifying an existing group in the directory.
dsmod ou /? - help for modifying an existing ou in the directory.
dsmod server /? - help for modifying an existing domain controller in the
directory.
dsmod user /? - help for modifying an existing user in the directory.
dsmod quota /? - help for modifying an existing quota specification in the
directory
dsmod partition /? - help for modifying an existing partition in the
directory

Directory Service command-line tools help:
dsadd /? - help for adding objects.
dsget /? - help for displaying objects.
dsmod /? - help for modifying objects.
dsmove /? - help for moving objects.
dsquery /? - help for finding objects matching search criteria.
dsrm /? - help for deleting objects.
dsmod failed:The parameter is incorrect.
type dsmod /? for help.



http://technet2.microsoft.com/Window....mspx?mfr=true






موضوعات مشابه: