Windows Commands: Modify active directory object


DSMOD-Windows Command

DSMOD (Windows XP)

Modify active directory object.

Syntax
   DSMOD computer Computer_DN options
   DSMOD contact ContactDN options
   DSMOD group   GroupDN  options
   DSMOD ou      OU_DN   Organizational_unit_options
   DSMOD server  ServerDN Domain_controller_options
   DSMOD user    User_DN  User_options
   DSMOD quota   QuotaDN  Quota_options
   DSMOD partition PartitionDN Partition_options
Key DN=Distinguished Name(s) OU=Organisational Unit Pretty much all the attributes can be modified (Name, display name, tel number etc) run the command with /? for a full list e.g DSMOD USER /?

Commas
Commas must be escaped with the backslash \ character
(other than separators in distinguished names)
e.g.
"CN=Company\, Inc.,CN=Users,DC=abc,DC=com"

Backslashes
Backslashes used in distinguished names must be escaped with a backslash
(for example,
"CN=Sales\\ Latin America,OU=Distribution Lists,DC=abc,DC=com").

Redirection
You can piperesults from DSQUERY into DSMOD in order to modify an object.
e.g. To find all users in the Marketing OU (organizational unit) and add them to the Sales group:

DSQUERY user –startnode "ou=Marketing,dc=abc,dc=com" | DSMOD group "cn=Sales,ou=Marketing,dc=abc,dc=com" -addmbr 

Spaces
If any value contains spaces, use quotation marks:

   "CN=John Smith,CN=Users,DC=abc,DC=com"

Special Tokens
The token $username$ (case insensitive) may be used to place the SAM account name.
Entering * as a password will cause DSMOD to prompt for the new password.

For any DS command you can enter multiple values separated by spaces.
e.g. to modify several user accounts at once just supply a list of the distinguished names separated with spaces.

Other Windows 98, Windows XP Commands:
addusers , arp , assoc , associate , at , attrib , browstat , cacls , call , cd , change , chkdsk , chkntfs , choice , cipher , cleanmgr , clip , cmd , color , comp , con2prt , copy , date , defrag , del , delprof , dir , diruse , diskcomp , diskcopy , doskey , dsadd , dsmod , echo , endlocal , exit , expand , expand , fc , fdisk , find , findstr , for , forfiles , format , fsutil , ftp , ftype , global , goto , help , hfnetchk , if , ifmember , ipconfig , kill , label , ldifde , local , logevent , logoff , logtime , mapisend , md , mem , mode , monitor , more , mountvol , move , moveuser , msg , msiexec , msinfo32 , mstsc , munge , mv , nbtstat , net , netdom , netsh , netstat , netsvc , now , nslookup , ntbackup , ntrights , path , pathping , pause , perms , ping , popd , portqry , print , prncnfg , prnmngr , prompt , pushd , qgrep , rasdial , rasphone , rd , rdisk , recover , reg , regedit , regsvr32 , rem , ren , replace , rmtshare , robocopy , route , runas , rundll32 , sc , schtasks , sclist , scriptit , set , setlocal , setx , share , shift , shortcut , showgrps , showmbrs , shutdown , sleep , soon , sort , start , su , subinacl , subst , tasklist , time , timeout , title , touch , tracert , type , ver , verify , vol , where , whoami , windiff , winmsd , winmsdp , wmic , xcacls , xcopy ,
Live2Support.com :
Product - Benefits - Features - How Does it Works - Pricing - SSL Certificates - Signup - Contactus - Login - Submit Resources