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:
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 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.
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 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!
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
Windows Management Instrumentation (WMI) is
most useful for PowerShell scripting.
SolarWinds
have produced this
Free WMI Monitor to take the guess work out of which
WMI counters to use for applications like Microsoft Active Directory,
SQL or Exchange Server.