locked
Get adusers UPN RRS feed

  • Question

  • Anyone can suggest a one liner or script to get AD users that do not have UPN and email address matching? For example I have  mostly users with first.last@domain.com UPNs, but some are just just first name letter and surname@domain.com.

    Thank you.


    MK

    Thursday, November 14, 2019 1:45 PM

Answers

  • -Filter "UserPrincipalName -notlike '*'"

    \_(ツ)_/

    • Marked as answer by waer01 Wednesday, November 27, 2019 11:21 AM
    Thursday, November 14, 2019 6:49 PM
  • Why dont you just export the user accounts with the 2 attributes and then import the csv into excel and then just compare both attributes.

    This should be done easily with this command...

    csvde -r "(objectclass=user)" -l mail,userprincipalname -f C:\Temp\Export_Users.csv

    You will have 3 column… DistinguishedName, Mail, UserPrincipalName

    hth


    This posting is provided AS IS without warranty of any kind

    • Marked as answer by waer01 Wednesday, November 27, 2019 11:21 AM
    Thursday, November 14, 2019 3:56 PM

All replies