Below command would give you the list of all service accounts in Active Directory.
get-aduser -filter * -properties Name, PasswordNeverExpires | where {$_.passwordNeverExpires -eq "true" } | Select-Object DistinguishedName,samaccountname,Name,Enabled,co,lastlogondate,Passwordlastset | Export-csv pw_never_expires.csv -NoTypeInformation