Account Expiry Email Alert

As Technet Gallery is retiring so moving the code to Git Hub. (click below github download link for this script)

Account Expiry Email Alert

 

Recently there was a requirement to monitor service accounts expiration, as in our enviornment 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.

Capture

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 = “AccountExpiry@labtest.com”

$days = “-15”   —This is the number of days before you want the reminder email to be sent

$errormail = “vikassukhija@labtest.com” (if script resulted in some sort of error than it should be reported to some email)

Capture

download Quest Management Shell (its a free shell) –> http://www.quest.com/powershell/activeroles-server.aspx

Note:–  Quest Management Shell is required for this script to work.

Tech Wizard

https://techwizard.cloud

https://syscloudpro.com/

PowerShell Cheat Book

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s