Quick [easyazon_link identifier=”B01NBI97UZ” locale=”US” tag=”wn0d5-20″] PowerShell [/easyazon_link] snippet to pull all accounts from [easyazon_link identifier=”1449361420″ locale=”US” tag=”wn0d5-20″] Active Directory [/easyazon_link] with PASSWORD NEVER EXPIRE into CSV report file so you can review the accounts and possible make changes as you need to.
Import-Module ActiveDirectory #Search for the users and export report get-aduser -filter * -properties Name, PasswordNeverExpires | where { $_.passwordNeverExpires -eq "true" } | Select-Object SamAccountName,Name,Enabled | Export-csv c:\Reports\pw_never_expires.csv -NoTypeInformation
This will create a csv file under C:\Reports\ with name pw_never_expires.csv where you will find all those accounts listed that have set Password Never Expire in [easyazon_link identifier=”1782175997″ locale=”US” tag=”wn0d5-20″] Active Directory [/easyazon_link]and those accounts are active.