Powershell command to Get UPN of all the users in Active Directory also Export to CSV

– Open Powershell in Elevated Mode
– Run the following command :

Get-ADUser -Filter * -Properties DisplayName, EmailAddress, Title, userPrincipalName | select DisplayName, EmailAddress, Title, userPrincipalName | Export-CSV “C:\UPN_Addresses.csv”

– You will get the Output in following format :

Download Remote Control Tool for Free : www.wingagaarbin.com

Leave a Reply

Your email address will not be published. Required fields are marked *