February 15, 2016

Report List of all user accounts with passwords that are set to never expire in windows server 2012

1. Open PowerShell ISE → Run the following PowerShell script:
Import-Module ActiveDirectory
Search-ADAccount -PasswordNeverExpires | Select-Object Name,ObjectClass,PasswordNeverExpires | Export-Csv c:\temp\
users_password_expiration_false.csv
2. Choose a location to save a .csv file.
3. Open a generated .csv file in Microsoft Excel.
Report example:


0 comments:

Post a Comment