Advanced Windows PowerShell Scripting Video Training

Advanced Windows PowerShell Scripting Video Training
Advanced Windows PowerShell Scripting Video Training

Monday, September 21, 2009

What is the syntax for adding users to a group with DSMOD?

Utilizing DSMOD to add users to a group requires that you be careful when typing the distinguished name of both the user and the group. Below is an example of a group named ITDept. This group is in the OU of Departments in the domain Wilderness.com. You want to add two users with the CN of Mike and Jill. Here is the syntax:

DSMOD Group “cn=ITDept,ou=Departments,dc=wilderness,dc=com” –addmbr “cn=Mike, ou=Departments,dc=wilderness,dc=com” “cn=Jill, ou=Departments,dc=wilderness,dc=com”

The list of distinguished names that you are adding is space delimited.

Reference: http://technet.microsoft.com/en-us/library/cc737130(WS.10).aspx

No comments: