Management Shell and ProxyAddresses
Hi forumers, Any ideas how to get emailaddresses from the users. By running the follow PS command: Get-MailBox -OrganizationalUnit "cn=Users,dc=domain,dc=com" | select-object Name,EmailAddresses,DistinguishedName | export-csv Mailboxes.csv The "EmailAddresses" contains: "Microsoft.Exchange.Data.ProxyAddressCollection". How to get real proxy addresses? -- Petri
November 4th, 2010 4:57pm

Hi forumers, Any ideas how to get emailaddresses from the users. By running the follow PS command: Get-MailBox -OrganizationalUnit "cn=Users,dc=domain,dc=com" | select-object Name,EmailAddresses,DistinguishedName | export-csv Mailboxes.csv The "EmailAddresses" contains: "Microsoft.Exchange.Data.ProxyAddressCollection". How to get real proxy addresses? -- Petri Try the following get-mailbox -org users | select Name, PrimarySmtpAddress | export-csv Mialboxes.csv
Free Windows Admin Tool Kit Click here and download it now
November 4th, 2010 6:11pm

Thanks Micheal, But I need the proxyaddresses. Not only the primary address.. -- Petri
November 4th, 2010 6:20pm

Try this: $a = Get-MailBox -OrganizationalUnit "dc=users,dc=dom,dc=tld " | select-object Name,EmailAddresses,DistinguishedName foreach ($mbx in $a){$mbx.emailaddresses = [string]($mbx.emailaddresses |% {$_.addressstring})} $a | export-csv mbxs.csv -notype [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
Free Windows Admin Tool Kit Click here and download it now
November 4th, 2010 7:07pm

Thanks to you Rob. But by some reason my EmailAddresses is empty on the $a. Maybe I have to check this a bit more careful. -- Petri
November 4th, 2010 7:51pm

I tested against one of my OU's (after changing the OrganizationalUnit parameter for my OU and domain) and it worked fine. [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
Free Windows Admin Tool Kit Click here and download it now
November 4th, 2010 8:06pm

Thanks to you Rob. But by some reason my EmailAddresses is empty on the $a. Maybe I have to check this a bit more careful. -- Petri Try the link below with the command. http://www.experts-exchange.com/Software/Server_Software/Email_Servers/Exchange/Q_23295969.html
November 4th, 2010 8:15pm

I run mjolinor's cmdlet and it works,too. Petri, you can also try this one: Get-MailBox -OrganizationalUnit "cn=Users,dc=domain,dc=com" | select-object Name,DistinguishedName -Expandproperty EmailAddresses | select Name,Proxyaddressstring,DistinguishedName | export-csv Mailboxes.csvFrank Wang
Free Windows Admin Tool Kit Click here and download it now
November 5th, 2010 4:35am

Hi Petri, Any updates?Frank Wang
November 8th, 2010 1:14am

Hi Petri, Any updates on your issue?Frank Wang
Free Windows Admin Tool Kit Click here and download it now
November 9th, 2010 8:53pm

I run mjolinor's cmdlet and it works,too. Petri, you can also try this one: Get-MailBox -OrganizationalUnit "cn=Users,dc=domain,dc=com" | select-object Name,DistinguishedName -Expandproperty EmailAddresses | select Name,Proxyaddressstring,DistinguishedName | export-csv Mailboxes.csv Frank Wang I ran mjolinor's command and it work for me. Thanks.
November 9th, 2010 11:41pm

I found mjolinor's script to work for me as well, however it breaks out recipients on their own row: Below is another approach, which creates new columns for the addresses. This also looks for users with more than 1 proxy address, but that could be removed, if you just want a dump of everyone: http://mikecrowley.wordpress.com/2012/04/16/exchange-proxy-address-alias-report Mike Crowley | MVP My Blog -- Planet Technologies
Free Windows Admin Tool Kit Click here and download it now
April 16th, 2012 5:06pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics