# Get-ADUser -filter "msExchUserAccountControl -eq '0'" | Select-Object SamAccountName | Export-CSV -Delimiter `t -NoTypeInformation -Path "c:\files\MAILAR.csv" #Get-ADUser -filter "msExchShadowProxyAddresses -like 'Microsoft.ActiveDirectory.Management.ADPropertyValueCollection'" -Property msExchShadowProxyAddresses | Select-Object SamAccountName | Export-CSV -Delimiter `t -NoTypeInformation -Path "c:\files\MAILAR.csv" Get-ADUser -filter * -Properties * | Where-Object { $_.msExchShadowProxyAddresses -ne $null } | Select-Object SamAccountName | Export-CSV -Delimiter `t -NoTypeInformation -Path "c:\files\MAILAR.csv"I have tried several attributes.
msExchUserAccountControl seems to be promising. It get a number close to the email users.