Handy AD/Server PowerShell commands

  • Post author:
  • Post category:Microsoft

Run these on a Domain Controller

List AD users with passwords that are configured to not expire.

get-aduser -filter * -properties Name, PasswordNeverExpires | where {$_.passwordNeverExpires -eq "true" } | Select-Object DistinguishedName,Name,Enabled | ft


Jason works as a project specialist at an IT MSP in Pennsylvania, USA. He's an IT/security professional with 20 years experience.