locked
Export All Mailboxs | to CSV RRS feed

  • Question

  • Exchange 2007

    I need to be able to Get all Mailboxes including all attributes (Dept, Job Title, Manager, Location, etc) as well as account status ((Disabled (true or false) and Hidden from Address List (true or false)) and be able to pipe that to a CSV file.

    I can not find the correct EX Management Shell command(s), to accomplish this.

    I am OK if I need to run seperate commands and then consolodate the information.

    I just need a way to do it.

    Thank you in advance.


    • Edited by 5by5 Thursday, February 9, 2012 4:56 PM
    Thursday, February 9, 2012 4:44 PM

Answers

  • Some of those are user properties and some are mailbox properties.  You cannot get all of the information you're asking for from one cmdlet, so you'll have to create an array of custom PS objects that combines output from multiple cmdlets.

    This is more of a scripting question than a Exchange question. 

    Try these forums:

    This is a fairly common Powershell scripting question - search before you ask, you'll likely find lots of examples fairly easily.

    http://social.technet.microsoft.com/Forums/en/ITCG/threads

    http://social.technet.microsoft.com/Forums/en-US/winserverpowershell/threads


    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "


    • Edited by mjolinor Thursday, February 9, 2012 5:16 PM
    • Proposed as answer by Castinlu Monday, February 13, 2012 2:47 AM
    • Marked as answer by Castinlu Tuesday, February 21, 2012 4:16 AM
    Thursday, February 9, 2012 5:15 PM
  • Get-mailbox | Export-csv C:\mailbox.csv
    • Proposed as answer by Castinlu Monday, February 13, 2012 2:47 AM
    • Marked as answer by Castinlu Tuesday, February 21, 2012 4:16 AM
    Thursday, February 9, 2012 10:47 PM

All replies

  • Some of those are user properties and some are mailbox properties.  You cannot get all of the information you're asking for from one cmdlet, so you'll have to create an array of custom PS objects that combines output from multiple cmdlets.

    This is more of a scripting question than a Exchange question. 

    Try these forums:

    This is a fairly common Powershell scripting question - search before you ask, you'll likely find lots of examples fairly easily.

    http://social.technet.microsoft.com/Forums/en/ITCG/threads

    http://social.technet.microsoft.com/Forums/en-US/winserverpowershell/threads


    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "


    • Edited by mjolinor Thursday, February 9, 2012 5:16 PM
    • Proposed as answer by Castinlu Monday, February 13, 2012 2:47 AM
    • Marked as answer by Castinlu Tuesday, February 21, 2012 4:16 AM
    Thursday, February 9, 2012 5:15 PM
  • Get-mailbox | Export-csv C:\mailbox.csv
    • Proposed as answer by Castinlu Monday, February 13, 2012 2:47 AM
    • Marked as answer by Castinlu Tuesday, February 21, 2012 4:16 AM
    Thursday, February 9, 2012 10:47 PM