Post by Pegasus [MVP]Post by Matthew GoodAt this point I'm more interesting in creating a script to automate the
creation and deletion of users in AD and a user directory.
Have a look at this authoritative site for VB Scripts dealing with AD
issues: http://www.rlmueller.net.
PowerShell is the latest scripting language from Microsoft, but it requires
the .NET Framework. Also, the AD module that allows PowerScript programs to
interact with AD requires Windows Server 2008 on a 64-bit machine (or
possibly third party add-on components). Also, PowerShell syntax is more
similar to batch file programs. It uses piping and redirection extensively.
I feel it is harder to read and understand unless you use it all the time.
For now I would recommend VBScript, both for logon scripts and AD
Administrative tasks. An example VBScript program to create users in bulk
from the information in an Excel spreadsheet:
http://www.rlmueller.net/CreateUsers.htm
The program can create and assign home directories. A VBScript program can
be written to delete user objects, if there is a source of user names
(Distinguished Names or "pre-Windows 2000 logon" names). You could read
names from a text file or spreadsheet. The steps to delete one specified
user is demonstrated in this link from the Script Center:
http://www.microsoft.com/technet/scriptcenter/scripts/ad/users/manage/usmgvb07.mspx
However, you might want to use Joe Richards' free oldcmp utility:
http://www.joeware.net/freetools/tools/oldcmp/index.htm
It is highly recommended for finding and cleaning up unused user accounts,
as well as computer accounts.
--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--