Register
: :
Login
Home
News
Forums
Scripts
User Groups
Resources
About
Forums
Search
Members
Unanswered
Active Topics
Forums
>
Using PowerShell
>
Exchange Server
List all Displayname, smtp address
Last Post 09 Jul 2010 08:50 AM by
B1gN2Cheese
. 2 Replies.
Sort:
Oldest First
Most Recent First
Prev
Next
You are not authorized to post a reply.
Author
Messages
madetis1
New Member
Posts:1
04 Jul 2010 09:37 PM
Hi,
I am new to Powershell n exch 2007... I need help with extracting displayname along with their mail addresses in a csv file...
Thanks
Shay Levy
PowerShell MVP, Admin
Veteran Member
Posts:1362
05 Jul 2010 03:31 AM
Try this:
Get-Mailbox -ResultSize Unlimited | Select-Object DisplayName,PrimarySmtpAddress | Export-Csv emails.csv
Shay Levy
Windows PowerShell MVP
http://PowerShay.com
PowerShell Community Toolbar
Twitter:
@ShayLevy
B1gN2Cheese
New Member
Posts:2
09 Jul 2010 08:50 AM
Try this:
## All SMTP aliases
Get-Mailbox -resultsize unlimited | Select-Object displayname -expand emailaddresses | Export-Csv emails.csv
If you want to filter on prefix type (e.g. SMTP, Notes, SIP, etc) try this:
## All SMTP alieases by prefix
Get-Mailbox -resultsize unlimited | Select-Object displayname -expand emailaddresses | where-object {$_.prefix -like "SIP"} | Export-Csv emails.csv
Hope this helps!
You are not authorized to post a reply.
Using PowerShell
--General PowerShell
--Books, Tools, and Videos
--Exchange Server
--Active Directory
--System Center Family
--Non-Microsoft Products
--SharePoint
--SQL Server
--Working with .NET
--Peer Review
--Testing, Testing...
PowerShell Development
--Cmdlet Development
--PSDrive Provider Development
--Hosting the Shell
Looking Ahead
--Using PowerShell v2.0
--Developing for PowerShell v2.0
PowerShellCommunity.org
--Community Announcements and Assistance
--Completely Unrelated
--User Groups
--Community Business
----Suggestion Box
Forums
>
Using PowerShell
>
Exchange Server
Active Forums 4.3
Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2