Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Getting active accounts with "PasswordNeverExpires" from Active Directory
- #The output information is written to a file result.csv
- #The script requires the active Directory PowerShell module installed
- get-aduser -filter * -properties Name, PasswordNeverExpires | where { $_.passwordNeverExpires -eq "true" } | where {$_.enabled -eq "true"} | Export-Csv C:\Result.csv -NoTypeInformation -Force
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement