I think this has become my favorite zone as much as I'm here : )
I'm curious, does anyone have a script already or can provide suggestion how to pull this information I'm needing into a report i.e. .csv file? I'm needing to pull all ACTIVE ACCOUNTS in AD that begin with the following prefix: "NPS" NPS accounts are contractors within the company and the standard naming convention is NPSjohndoe or NPS12345678 ect... NPS is always first though.
Then once the script has identified all of the ACTIVE NPS accounts, it then determines by looking at the Expire date which NPS accounts that are about to expire in 30 days. For the accounts the script hits on that are about to expire it then provides the Manager field info for that account. Lastly, it then sends an automated email to that manager notifying them that "Hey your NPS employee's account is about to expire. Please confirm their information." in the body... Is this possible?
So to re-cap:
* Pulls all Active NPS accounts in AD.
* Indentify's which NPS accounts that are about to expire in 30 days.
* Pulls the manager field value for those accounts it identify's that are about to expire.
* Lastly builds a report and automatically emails that manager based off of that managers email in the properties of the NPS account. The email will inform the Manager that their NPS employees account is about to expire.