Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Ad-User script to check if expired password = true and email helpdesk

$
0
0

I have a script that runs each day and reminds my users that their password will expire. This works well.

I'm having trouble creating a script to email our helpdesk once the password has expired so engineers can reset it automatically.

The code I have displays nothing yet I know I have expired passwords.

Get-ADUser -filter {(Enabled -eq $True) -and (PasswordNeverExpires -eq $False) -and (PasswordExpired -eq $True)} -properties PasswordLastSet, PasswordExpired, PasswordNeverExpires, EmailAddress, GivenName

Please help!


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>