Export Mailboxes to .csv

Home Forums Messaging Software Exchange 2007 / 2010 / 2013 Export Mailboxes to .csv

This topic contains 1 reply, has 2 voices, and was last updated by  Ossian 2 years, 5 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • lavazza

    I need to be able to see all the columns that the shell exports to .csv.
    My script that I use looks like this;

    $mailboxes=get-mailbox -organization “OU” -results Unlimited
    $results=ForEach($mb in $mailboxes){
    $stats=get-mailboxstatistics $mb
    [email protected]{
    New-Object PsObject -Property $props
    $results | Sort-Object TotalItemSize -descending | ft -autosize > c:tempOU.csv

    This successfully exports all the details to .csv however all the email addresses in the last column is incomplete eg. “[email protected]……”, “[email protected]…….”
    I’ve tried posting on other forums also and can’t get a working script to get all my data required to see what’s going on in the organization. Unless I manually type out all the addresses I see in OWA.

    see this thead; https://social.technet.microsoft.com/Forums/office/en-US/e9d1e7d3-fb24-42c8-b4e5-3f7ebabd508e/exporting-list-of-mailboxes-to-csv?forum=exchangesvradmin


    Remove the FT and pipe directly to EXPORT-CSV
    You are pre-formatting the output so will lose some data

    Your last line should read $results | Sort-Object TotalItemSize -descending | export-csv c:tempOU.csv

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.