I created a little power shell script that basically will list out all the UPN and email in our domain.
Get-ADUser -Filter ‘Enabled -eq $true’ -Properties * |Select-Object userPrincipalName,mail |export-csv -NoTypeInformation c:\scripts\UPN.csv
It does the core of what I want it to do. However, I am needing a condition added.
if UPN is not equal to email then the email is exported to my list.
This way we have a list of all the emails that have a different or blank UPN.
I know this can be done in excel but as I am weaker on the conditionals I figured this would be good to work on.