Finding Active Directory passwords set to never expire

Resul Coskun 3 Eylül 2022 17:45

You can print out the accounts with Password Never Expires definition in your structure with the code I have shared below.

Active Directory passwords set to never expir

When you run the code below with powershell, it exports the list of accounts that you want the password to never expire to C:\Temp\PassNeverExpiresUsers.CSV.

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

Active Directory passwords

Bir yanıt yazın

Yorumlar (0)

Bu yazıya ait yorum bulunamadı. İlk yorumu sen yapmak ister misin?