header1   header
header
header Register : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
List all Displayname, smtp address
Last Post 09 Jul 2010 08:50 AM by B1gN2Cheese. 2 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
madetis1User is Offline
New Member
New Member
Posts:1
Avatar

--
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 LevyUser is Offline
    PowerShell MVP, Admin
    Veteran Member
    Veteran Member
    Posts:1362
    Avatar

    --
    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
    B1gN2CheeseUser is Offline
    New Member
    New Member
    Posts:2
    Avatar

    --
    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.


    Active Forums 4.3
    right
    footer   footer
    footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2 footer
    footer   footer