To see all admin accounts in the admin’s OUs
$OUs = "OU=AdministratorAccounts,OU=Datacenter,DC=coolDomain,DC=COM",
"OU = Admin.Accounts,OU=Azure_Admin_Center,DC=coolDomain,DC=COM"
$OUs | foreach { Get-ADUser -Filter * -SearchBase $_ -Properties LastLogonDate,passwordlastset} | Select samaccountname,enabled,LastLogonDate,passwordlastset
To see all admin accounts in these OUs search for “.” and zz*, so the xx.5+5 accounts
$OUs=
"OU=AdministratorAccounts,OU=Datacenter,DC=coolDomain,DC=COM",
"OU=Admin.Accounts,OU=Azure_Admin_Center,DC=coolDomain,DC=COM"
$OUs | foreach { Get-ADUser -Filter 'SamAccountName -like "*.*" -or sAMAccountName -like "zz*"' -SearchBase $_ -Properties LastLogonDate,passwordlastset} | Select samaccountname,enabled,LastLogonDate,passwordlastset
Foreach($OU in $OUs){
Get-ADComputer -filter * -Searchbase $OU | select Name
}