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 5:02pm

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:16pm

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

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:12pm

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:55pm

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:11pm

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:19pm

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:40am

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

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

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:46pm

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

Other recent topics Other recent topics