DS Command Line Tools for Active Directory 2003

New DS built-in tools for Windows Server 2003

You really are spoilt for choice when it comes to scripting tools for creating Active Directory objects.  In addition to CSVDE, LDIFDE and VBScript, we now have the following DS commands:

The DS family of built-in utilities



Adding objects is great, but there are times in Windows 2003 when you need to change the Active Directory properties.

Scenario, you wish to quickly change a user’s password.  This is task you are going to have to do regularly, and you would like to able to do it quickly from the command line.  Let us now modify the the user’s password with DSmod


Example 1 Modify Password

Logon to your domain controller.  Check which users you have, if necessary create an ou called guyds and user called guyt.  See DSadd

Examine the script below.  Decide how cn= or ou= or dc= need editing.

Run, CMD then copy your script and paste into the command window.  Alternatively type it starting with dsmod user ………

dsmod user "cn=guyt, ou=guyds, dc=cp, dc=com" -pwd a1yC24kg

Guy Recommends:  SolarWinds’ Free Bulk Import ToolFree Download Solarwinds Bulk Import Tool

Import users from a spreadsheet.  Just provide a list of the users with their fields in the top row, and save as .csv file.  Then launch this FREE utility and match your fields with AD’s attributes, click and import the users.

Optionally, you can provide the name of the OU where the new accounts will be born. Download your FREE bulk import tool.

If you need more comprehensive software, download a free trial of SAM (Server & Application Monitor)

Example 2 Create user WITH password

Note 1: We could have created the password at the same time we created the user.  For ease of learning I introduce one variable at a time.  However, here is the complete command to add a user with a password.

dsadd user "cn=pault, ou=guyds, dc=cp, dc=com" -pwd a1yC24k

Engineer's Toolset v10Guy Recommends: SolarWinds Engineer’s Toolset v10

This Engineer’s Toolset v10 provides a comprehensive console of 50 utilities for troubleshooting computer problems.  Guy says it helps me monitor what’s occurring on the network, and each tool teaches me more about how the underlying system operates.

There are so many good gadgets; it’s like having free rein of a sweetshop.  Thankfully the utilities are displayed logically: monitoring, network discovery, diagnostic, and Cisco tools.  Try the SolarWinds Engineer’s Toolset now!

Download your fully functional trial copy of the Engineer’s Toolset v10

Example 3 Modify Groups

Another use of DSmod is to add members to a group.

In this instance you need the full distinguished name (DN) of the group then the -addmbr switch followed by the DN of the users.  Tricky method!  Try dsmod group /? for more help.

Problems contact Guy Thomas see below for email address

If you like this page then please share it with your friends


See more of the DS family of built-in Active Directory utilities

DSQuery   • DSQuery User   • DSQuery Group    • Free Import CSV Tool

• DSGet – List the properties of an object   • DS Commands   • WSH – Create a user

• DSMod – Modify Active Directory attributes    • DSAdd – Create new accounts