Here is the command to list PasswordNeverExpires users from active directory. The below command list all enabled users with PasswordNeverExpires.
get-aduser -filter * -properties Name, PasswordNeverExpires | where { $_.passwordNeverExpires -eq "true" } | where {$_.enabled -eq "true"}
Comments