I have been tasked to create Prompt for our users logging into our terminal server farm where if their AD password is less than 6 days from expiring, they will receive a window prompt informing them of the expiration and with an option to Change their password or do it later.
The Windows Form is a no brainer which I will create with PowerShell studio. I will simply create a form that will do a Get-Date for today and then based on the user login, do a get-aduser for that user and then get the expiration date, get the difference date and if less than or equal to 6 days, display my windows form. One button will call the shell script to change their password and the other will just close the form.
My only issue is where do I launch this powershell form from? Each user uses a login script so do I launch it from there? I need to have them fully logged into their terminal server before they see the prompt. Do I use NetLogin and call my script that way?
Not really sure how to position this script (I will most likely have a full exe placed somewhere in our environment)