Created
March 30, 2017 04:11
-
-
Save TheRealNoob/73983633954c455ceaa2f43677160f56 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$list = import-csv file.csv | |
Foreach ($person in $list) { | |
Send-MailMessage -To $person."E-Mail Address" -Subject "Password expires in $person."Password expires in" days" ` | |
-From * ` | |
-Body "$person."Display Name", your password is due to expire in $person."Password expires in" days. Please change it or die." | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment