Monday, May 22, 2006 

Active Directory Locked Account Monitor

Here is a simple perl script to monitor the number of locked accounts in your Active Directory domain. This script uses unlock.exe which is availabe from JoeWare.net.

If the number of locked accounts exceeds the defined threshold the script will notify you via e-mail.

Requirements:
  1. Windows 2003 / Windows XP / Windows 2000
  2. Perl installed
  3. Unlock.exe in path
  4. SMTP server for e-mail notificaiton
Instructions:
Modify these lines below to your desired settings and to match your enviroment:

$lockedThreshold = 10;
$unlockCmd = "unlock.exe . * -view 2>NUL";
@notifyList = qw(
admin
);
$mailFrom = "AccountLockout";
$mailSubject = "Account Lockout Alert";
$mailServer = "mailserver.domain.com";

Download:
Locked Account Monitor.pl

Friday, May 05, 2006 

Join Domain Tool

Here is a utility to help users joining a computer to an Active Directory domain. It provides similiar functionality to the netdom.exe utility in that it was designed to allow you to specify an OU (organizational unit) when you're joining the domain.

In our enviroment we have a well structured list of organizational units. The workstation objects should all be placed in the OU where the user object resides. However as the default join places the computers in the "Computers" container technicians can sometimes forget to move the workstation object to it's proper destination.

Screenshot:


Requirements:
Latest version of AutoIT with COM Support
(AutoIT is a small VBScript like lanaguage. It was used in this project as a test and to sample the easy GUI controls it offers.)

Download the Utility:
Download JoinDomain.au3

Instructions:
1. Download and install the latest beta of AutoIt
2. Download JoinDomain.au3
3. Edit JoinDomain.au3 in a text editor and change the following lines:
$adDefaultContext = "DC=DOMAIN,DC=COM"
$adDomainController = "dc.domain.com"
$adDomain = "DOMAIN"
$adUsername = ""
$adPassword = ""

(If you leave the username and password variable blank, you will be prompted for these each time you run the program)
4. Right click on JoinDomain.au3 and choose "Compile Script"
5. Distribute resulting JoinDomain.exe to your technicians or deploy on corporate image

Graphical Usage Demonstration:

About me

Photos

Sponsored Links:

Digg