Windows Server Summit 2024
Mar 26 2024 08:00 AM - Mar 28 2024 04:30 PM (PDT)
Microsoft Tech Community
LIVE

export AD users with password never expire to csv file

Steel 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. :)