Directory Services

Guy recommends :
Free Solarwinds
VM Console

Solarwinds VM Console Free Download

Find out which of your VMs are a waste of space and which VMs need more resources.


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

 ♦

DSmod

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

Preparation:

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

There are also two bonus tools in the free download, and all 3 have been approved by Microsoft:

  1. Bulk-import new users into Active Directory.
  2. Seek and zap unwanted user accounts.
  3. Find inactive computers.

Download your FREE bulk import tool.

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

Guy Recommends: SolarWinds Engineer's Toolset v10Engineer's Toolset v10

This Engineer's Toolset v10 provides a comprehensive console of 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, discovery, diagnostic, and Cisco tools.  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

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

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

 *


Custom Search

Guy Recommends: WMI Monitor and It's Free!Solarwinds WMI Monitor

Windows Management Instrumentation (WMI) is one of the hidden treasures of Microsoft operating systems.

Fortunately, Solarwinds have created the Free WMI Monitor so that you can actually see and understand these gems of performance information.  Take the guess work out of which WMI counters to use for applications like Microsoft Active Directory, SQL or Exchange Server.

Download your free copy of WMI Monitor

 

Home Copyright © 1999-2012 Computer Performance LTD All rights reserved

Please report a broken link, or an error.