export AD users with password never expire to csv file

Super Contributor

any script to export AD users with password never expire to csv file

 

thanks

1 Reply

Hi @Marvin Oco,

 

try this

 

Search-ADAccount -PasswordNeverExpires -UsersOnly -ResultPageSize 2000 -resultSetSize $null | Select-Object Name, SamAccountName, DistinguishedName | Export-CSV “C:\Temp\PassNeverExpiresUsers.CSV” -NoTypeInformation

Best regards,
Schnittlauch

 

"First, No system is safe. Second, Aim for the impossible. Third no Backup, no Mercy" - Schnittlauch

 

My answer helped you? Don't forget to leave a like. Also mark the answer as solved when your problem is solved. :)