Sunday, June 15, 2014

Account Expiry Email Alert

Hi Readers,
Recently there was a requirement to monitor service accounts expiration, as in our environment every service account is configured for expiry & if it is missed than it can cause issues with Critical Applications.
This script will monitor accounts mentioned in csv file & send email alerts to corresponding email before 15 days account expiry date is reached.
extract the zip file, Change the below variables at the beginning of the script, update the csv file with the accounts that you want to monitor  and schedule the batch file thru task scheduler.
$smtpserver = "smtpserver"
$from = ""
$days = "-15"   ---This is the number of days before you want the reminder email to be sent
$errormail = "" (if script resulted in some sort of error than it should be reported to some email)
download Quest Management Shell (its a free shell) -->
 Note:-  Quest Management Shell is required for this script to work.
Sukhija Vikas

No comments:

Post a Comment