DSMOD Contact (installable option via RSAT /AD DS)

Modify a contact in active directory.

Syntax
      DSMOD contact ContactDN [Options] [-c] [-q] [{-uc | -uco | -uci}]

Key
   ContactDN   Distinguished name of the contact that you want to add.
               If omitted will be taken from standard input (stdin)

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

Options:

   [-fn FirstName] [-mi Initial] [-ln LastName] [-display DisplayName]
   [-desc Description] [-office Office] [-tel PhoneNumber]
   [-email Email] [-hometel HomePhoneNumber] [-pager PagerNumber]
   [-mobile CellPhoneNumber] [-fax FaxNumber] [-iptel IPPhoneNumber]
   [-title Title] [-dept Department]
   [-company Company] 

   [{-s Server | -d Domain}]
   [-u UserName] [-p {Password | *}]

Examples

Modify the contact fred to add a telephone number in AD:

C:\> set _fred="cn=fred,ou=staff,dc=ss64,dc=com"
C:\> dsmod contact %_fred% -tel "01234 5678"

Modify the contact JohnS to add a department in AD:

C:\> set _john="cn=JohnS,cn=users,dc=ss64,dc=com"
C:\> dsmod contact %_fred% %_john% -dept "Warehouse"

"The highest reward for a person’s toil is not what they get for it but what they become by it” ~ John Ruskin

Related commands

DSAdd - Add object. DSAdd Contact - Add a contact to active directory.
DSMod - Modify object.
DSGet - Display object. DSGet Contact - Display contact(s) from active directory.
DSMove - Move object.
DSQuery - Search for objects. DSQuery Contact - Search for contacts in active directory.
DSRM - Delete object.
LDIFDE - Edit AD Objects, extend schema, import or export AD information.
PowerShell: Set-adObject - Modify an AD object.
Equivalent bash commands (Linux): ldapmodify - Modify Lightweight Directory Access Protocol.


 
Copyright © 1999-2024 SS64.com
Some rights reserved