PS list accounts
Get Service Accounts
this script finds accounts with patterns
$OUs = 'OU.txt'
Get-Content $Ous | ForEach-Object {
$OU = $_
Get-Aduser -Filter * -SearchBase "OU=Service Accounts, ou=$o,ou=enterprise support, dc=ent, dc=ad,.dc=foo,dc=com" | format-table Name >> accounts.txt
}