Powershel script notify users with unchanged password
$servermail="192.168.11.1" [string]$userName = 'dom\user' [string]$userPassword = 'goodpass' [string]$from = 'user#dom.test' $secStringPassword = ConvertTo-SecureString $userPassword -AsPlainText -Force $credObject = New-Object System.Management.Automation.PSCredential ($userName, $secStringPassword) Function SendMail{ param ($credentials , $mailServer, $from, $to, $subject, $body) Send-MailMessage" "-To $to -From $from -Subject $subject -Body $body -SmtpServer $mailServer -ErrorAction Stop -Credential $credentials" } #generate list with all users $usrlist = Get-ADUser -Properties PasswordLastSet,Created,whenChanged,msDS-UserPasswordExpiryTimeComputed,lastlogon,EmailAddress,memberOf -Filter * | Select-Object Name,sAMAccountName,ObjectClass,EmailAddress,Enabled,Created,whenChanged,PasswordLastSet,@{Name='LastLogon';Expression={[DateTime]::FromFileTime($_.LastLogon)}},@{N="msDS-UserPasswordExpiryTimeComputed"...