Forum Discussion
vignesh_Learn
Jan 28, 2021Copper Contributor
export email address as array list
I am trying to export a list of users email address in array format.. say I have 10 users in a CSV file (displayname) Need a command to export their emailaddresses in array type example: colum1 s...
farismalaeb
Jan 28, 2021Iron Contributor
$Myusers=@("Firstname LastName","FirstName1 LastName1")
$Myusers.foreach{Get-ADUser -Properties mail,proxyAddresses -Filter "displayname -like '$_'" | ft mail,proxyAddresses }
Use this method if you don't have Exchange Management Shell or want to get the information via Active Directory.