Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources: Active Threads
Viewing all articles
Browse latest Browse all 8411

trying to get the primary SMTP address for a user

$
0
0

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


Viewing all articles
Browse latest Browse all 8411

Latest Images

Trending Articles



Latest Images