{"id":1734,"date":"2014-02-05T11:41:06","date_gmt":"2014-02-05T11:41:06","guid":{"rendered":"http:\/\/galhano.com\/blog\/?p=1734"},"modified":"2014-02-05T12:28:47","modified_gmt":"2014-02-05T12:28:47","slug":"export-to-csv-all-your-exchange-20072010-email-addresses","status":"publish","type":"post","link":"http:\/\/galhano.com\/blog\/?p=1734","title":{"rendered":"Export to CSV all your Exchange 2007\/2010 Email Addresses"},"content":{"rendered":"<p>If you want to export all your users email addresses to a CSV so you can see who has which alias you can do this with this Power Shell Command<\/p>\n<p>[ps]<\/p>\n<p>Get-Mailbox -ResultSize Unlimited<br \/>\n|Select-Object DisplayName,ServerName,PrimarySmtpAddress, @{Name=\u201cEmailAddresses\u201d;Expression={$_.EmailAddresses<br \/>\n|Where-Object {$_.PrefixString -ceq \u201csmtp\u201d}<br \/>\n| ForEach-Object {$_.SmtpAddress}}}<br \/>\n| Export-CSV c:\\smtp.csv -NoTypeInformation<\/p>\n<p>[\/ps]<\/p>\n<p>I have wrapped it here so just paste it in to Power Shell to run and this will show the Primary Email address and then all the alias addresses.<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"29m8TqjfYB\"><p><a href=\"https:\/\/unlockpowershell.wordpress.com\/2010\/01\/27\/powershell-get-mailbox-display-smtp-addresses\/\">PowerShell Get-Mailbox display SMTP&nbsp;addresses<\/a><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;PowerShell Get-Mailbox display SMTP&nbsp;addresses&#8221; &#8212; Unlock-PowerShell\" src=\"https:\/\/unlockpowershell.wordpress.com\/2010\/01\/27\/powershell-get-mailbox-display-smtp-addresses\/embed\/#?secret=0lyfm8r2ae#?secret=29m8TqjfYB\" data-secret=\"29m8TqjfYB\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><br \/>\nhttp:\/\/cscmblog.blogspot.pt\/2012\/02\/export-to-csv-all-your-exchange.html<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you want to export all your users email addresses to a CSV so you can see who has which alias you can do this with this Power Shell Command [ps] Get-Mailbox -ResultSize Unlimited |Select-Object DisplayName,ServerName,PrimarySmtpAddress, @{Name=\u201cEmailAddresses\u201d;Expression={$_.EmailAddresses |Where-Object {$_.PrefixString -ceq \u201csmtp\u201d} | ForEach-Object {$_.SmtpAddress}}} | Export-CSV c:\\smtp.csv -NoTypeInformation [\/ps] I have wrapped it here so [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"close","ping_status":"close","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33,21,22,161],"tags":[],"class_list":["post-1734","post","type-post","status-publish","format-standard","hentry","category-code-snippets","category-exchange","category-microsoft","category-powershell","author-admin"],"_links":{"self":[{"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1734","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1734"}],"version-history":[{"count":6,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1734\/revisions"}],"predecessor-version":[{"id":1739,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1734\/revisions\/1739"}],"wp:attachment":[{"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1734"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1734"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1734"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}