static void Main(string[] args) { if (ArgFound("-?", args)) { Console.WriteLine(@"PasswordNotification.exe - Sends emails to any users that have passwords that are ready to expire."); Console.WriteLine(@"Command Line Example"); Console.WriteLine(@"PasswordNotification.exe"); Console.WriteLine(@""); Console.WriteLine(@"This utility requires two files. 1) a config file called Settings.config that contains application settings, and 2)a set of email template files that conain the warning text of each email."); return;

The code also requires a config file called settings.config that looks like this. You will need to change it to match the Active directory OU where you want the utility to start searching for users, or you can change it to the root OU. You can add as many "warning" sections as you wish for different notification schemes. The example below will send a warning 10 days, 3 days, and 1 day before a password is ready to expire. You will also need to set up the settings for your SMTP server to send the email.