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

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

Bu komut gerçekten işe yarıyor! Ek bir ipucu olarak, aynı çıktıyı elde ederken -Properties Enabled ekleyip sadece etkin hesapları filtreleyebiliriz: `Search-ADAccount -PasswordNeverExpires -UsersOnly -ResultPageSize 2000 -ResultSetSize $null | Where-Object {$_.Enabled} | Select-Object Name, SamAccountName, DistinguishedName | Export-Csv “C:\Temp\PassNeverExpiresUsers.CSV” -NoTypeInformation -Encoding UTF8`. Böylece CSV dosyamızda sadece aktif kullanıcılar yer alıyor ve UTF‑8 kodlaması sayesinde karakter sorunları da önlenmiş oluyor.