need a powershell script that will notifify when users pwd reaches the 60day mark

can someone provide a powershell or Quest AD cmdlets script that will check the members of a security group in AD daily and if any of the members of that group password reaches the 60 day mark. [or 30 days from expiry]  to send an automated email.

thx in advance,

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Stelian StanNetwork AdministratorCommented:
you can use this script:
just change this line:
$notificationstartday = 14 to $notificationstartday = 60

also change the following lines according to your environment:
$sendermailaddress = ""            
$SMTPserver = ""            
$DN = "DC=contoso,DC=com"

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
siber1Author Commented:
thx. I've seen that one, however how would I modify it to key on only select members of a particular security group as mentioned in my original question. [not all AD users]

Stelian StanNetwork AdministratorCommented:
For that you can change this line:

foreach ($user in (Get-ADUser -SearchBase $DN -Filter * -properties mail))

change -Filter * to -Filter { Name -like 'John*' }
Stelian StanNetwork AdministratorCommented:
if you want to select just a group then;

Get-ADGroup -Filter {GroupScope -eq "Security"}
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.