« Home | Join Domain Tool » | Campus Pipeline / Luminis Portal / uPortal Load Te... » | Grease Monkey Script - Google Books TSU Linky » | CME-24 / Blackworm / Blackmal / Nyexm / MyWife Vi... » | Group Policy Auto Logon Administrative Template » | Microsoft SQL Server T-SQL UDF Luhn Function » | Sysprep changes in Windows XP SP2 » 

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

Links to this post

Create a Link

About me

Photos

Sponsored Links:

Digg