so I'am writing a script to automate connection to o365 and exchange online, i was able to do that, then the script spouse to show me specific properties and from some reason it's selection only one property
$getusrname = read-host "what is the user name?"
Get-Mailbox -Identity *$getusrname* | ForEach-Object { write-host -ForegroundColor White "I found these users: $_"} | select name, @{n="Email adress";e='UserPrincipalName'}
I'am getting this output:
I found these users: Lev Leiderman
Thanks for your help