Полезное‎ > ‎CMD‎ > ‎dsmod‎ > ‎

dsmod ou


Modify an OU in active directory.

      DSMod OU OrganizationalUnit_DN 
         [-desc Description] 
            [{-s Server | -d Domain}]   [-u UserName]  [-p {Password | *}]
               [-c] [-q] [{-uc | -uco | -uci}]
   OrganizationalUnit_DN  Distinguished name of the OU that you want to modify.
                If omitted will be taken from standard input (stdin)
   -desc    Description of the OU
   -s       Server to connect to (Default=the domain controller in the logon domain.)
   -d       Domain to connect to.
   -u       Username with which the user logs on to a remote server. 
   -p       Password     (UserName or Domain\UserName or Username@domain.com)
   -c       Continue with the next object after any error (when you specify multiple target objects)
by default dsmod will exit when the first error occurs. -q Quiet, suppress all output -uc Unicode format -uco Unicode format for output only -uci Unicode format for input only

DS* commands are available on networked machines with the server role A.D. Domain Services installed, Domain Controllers (or for XP users: XP Professional).


Change the description of two OUs at once:

C:\> dsmod ou "OU=Italy,DC=ss64,DC=Com" "OU=Germany,DC=ss64,DC=Com" -desc "Some new descriptive text"

“The trouble with organizing a thing is that pretty soon folks get to paying more attention to the organization than to what they're organized for” - Laura Ingalls Wilder

Related commands:

DSAdd - Add object
DSMod - Modify object
DSGet - Display object 
DSMove - Move object
DSQuery - Search for objects 
DSRM - Delete object
CSVDE - Import or export AD info in CSV format.
LDIFDE - Edit AD Objects, extend schema, import or export AD information. 
Q322684 - Directory Service Command-Line Tools