- Open the Powershell ISE → Create new script with the following code and run it, specifying the path for export:
# Import the AD module to the session
Import-Module ActiveDirectory
#Search for the users and export report
get-aduser -filter * -properties Name, PasswordNeverExpires | where {
$_.passwordNeverExpires -eq "true" } | Select-Object DistinguishedName,Name,Enabled |
Export-csv c:\data\pw_never_expires.csv -NoTypeInformation
- Open the file produced by the script in MS Excel.
- Run Netwrix Auditor → Navigate to “Reports” → Open “Active Directory” → Go to “Active Directory - State-in-Time” → Select “User Accounts – Passwords Never Expire” → Click “View”.
- To receive the report regularly by email, click the “Subscribe” button and choose the schedule you prefer.