Get notification whenever a new computer is added to Active Directory.
This was actually created because I had two really really lazy PC guys who would build machine after machine, join the domain and just forget to put that new computer into it’s proper OU in Active Directory. If I didn’t catch them quick enough there would be a pile of machines that would not have GPO’s applied and would show up on security scans and count heavily on our audits. This script should be setup as a scheduled task to run at least once per day, I run it every few hours. It keeps the “Computers” OU from getting dirty due to neglect.
First DOWNLOAD the script, unzip it, and configure. The only configuration needed is a few entries at the top CONFIGURATION section of the script.
$ADBase = 'CN=Computers,DC=yourdomain,DC=com' $server = 'mail.yourdomain.com' $smtpFrom = 'email@example.com' $smtpTo = 'firstname.lastname@example.org' $smtpSubject = "NEW COMPUTER ACCOUNTS"
After configuration, simply setup a scheduled task in Task Manager to fit your needs.