简体   繁体   中英

Get SMTP address from a list of Names (Exchange 2013 powershell)

I'm trying to get SMTP address's for users who have OWAEnabled. I have what I think are two pieces that do what I want, but I can't figure out how to put them together. Ultimately it will output the SMTP address's to a CSV.

Get-CASMailbox -Filter{OWAEnabled -eq $true} | Select-Object Name This gets me a list of user "Names" who have OWA enabled.

Get-Mailbox -ResultSize Unlimited | Select-Object PrimarySmtpAddress This gets me Primary SMTP Address's

How do I put the two together? Sorry, i'm relatively new to PS.

Thanks for any help! :)

PrimarySMTPAddress is already a property of a CASMailbox object, so you just need to select it:

Get-CASMailbox -Filter{OWAEnabled -eq $true} | Select-Object Name,PrimarySMTPAddress

Most objects will have properties that aren't part of the default display properties, so they don't display by default.

Get-CasMailbox <identity> | format-list *

and you'll see all the available properties.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM