List it
Hello,
I use Exch 2007 and would like to get email addresses as a list in the power shell console. I don't look for a csv export.
Here what I get:
[PS] C:\>Get-Mailbox -Identity IDENTID1 | list emailaddresses
EmailAddresses : {SMTP:Fname.Lname@comp-any.com, smtp:Fname.Lname@company.com, smtp:IDENTID1@company.intra, smtp:ID1@company.com}
That is waht I wish to get:
[PS] C:\>Get-Mailbox -Identity IDENTID1 | ?????
EmailAddresses :
SMTP:Fname.Lname@comp-any.com,
smtp:Fname.Lname@company.com,
smtp:IDENTID1@company.intra,
smtp:ID1@company.com}
Thanks if you can give me a hand.
Graig
January 28th, 2011 4:50am
Is it for single user or multiple?
You can use this if it is just for one mailbox/identity
(Get-Mailbox -Identity IDENTID1).EmailAddresses | select ProxyAddressString
Free Windows Admin Tool Kit Click here and download it now
January 28th, 2011 5:27am
You can use be,ow cmdlet to get Primary SMTP address as well alais SMTP address.
Get-Mailbox | select name , alias ,EmailAddresses | foreach {
"Name: "+$_.name
"Alias: "+$_.alias
$_.EmailAddresses | foreach {
if($_.SmtpAddress){
if($_.IsPrimaryAddress){
"Primary SmtpAddress: $($_.SmtpAddress)"
} else {
"SmtpAddress: $($_.SmtpAddress)"
}
}
}
write-host
}
Anil
January 28th, 2011 5:56am