Hello,
I am trying to get the primary SMTP address for a user and place it in a text file but I keep getting @{PrimarySmtpAddress=Some.User@SomeCompany.com}. I am only wanting the Some.User@SomeCompany.com and not the rest of the junk surrounding it. Is there a way to remove this other information?
I am sure this is very simple and I am just missing it.
this is what I am using to get the information.
Get-mailbox -Identity $UID | Select-Object PrimarySmtpAddress
Thanks