Exporting mailboxes and archives from Office 365 without using Outlook.



  • Anyone know of a free way to mass export mailboxes from 0365, or even a powershell script to export email for one mailbox at a time.

    I am going to be exporting maybe 45 mailboxes, probably only imported 25 or so to whatever service I pick here in the next day or so. I have used Migrationwiz in the past, but I figure why waste the money.

    All the mailboxes have 6 months of email and then archiving turned on for everything older.

    A lot of guys use webmail around here since they run Linux, so doing it from powershell or using some other tool would be ideal. Even if I had to do one at a time.



  • Are you wanting to export the email as a pst file or as individual mail files?

    I haven't had to do this, just curious.



  • @DustinB3403 yeah I think that would be ideal. This way I can import the accounts to the new service for the users I keep and have an archive for the users that wont be coming to the new company

    I really thought powershell had done this. I spent some time using PS to setup archiving a few years back and havent touched it since.


  • Service Provider

    @bigbear I use a powershell script to create a PST archive for terminated employees with an in house Exchange server. never looked into it for O365 yet for a client.


  • Service Provider

    I have this saved as powershell script named CreatePST.ps1 in C:\Scripts on the Exchange server.

    # To execute script, you must open an exchange powershell window, elevated permissions not required.
    
    # First you must be in the scripts directory.
    # cd \scripts
    
    # Then execute the powershell script with 3 parameters.
    # ./CreatePST.ps1 >First Name< >Last Name< >email alias< 
    # ./CreatePST.ps1 Jared Busch jbusch
    
    # The export path is not a variable as we need to know that it is writable by the system.
    
    param (
        [string]$FirstName = $(throw "-FirstName is required."),
        [string]$LastName = $(throw "-LastName is required."),
    	[string]$alias = $(throw "-alias is required.")
    )
    
    New-MailboxExportRequest -Mailbox "$alias" -FilePath "\\server\share\PSTExports\$FirstName.$LastName.pst"
    Write-Host ""
    Write-Host "To check status, run: Get-MailboxExportRequest | Get-MailboxExportRequestStatistics"
    

    to my knowledge, there is no comparable feature for Office 365.

    Most people recommend you use Outlook.



  • @JaredBusch said in Exporting mailboxes and archives from Office 365 without using Outlook.:

    Get-MailboxExportRequest

    Unfortunately "Get-MailboxExportRequest " hasn't made it to Office 365 support.

    I did find that using ediscovery tools I could export all mailboxes as individual PST files. I hope they are formatted normally, will report back once its complete and downloaded.

    0_1490313144884_Screen Shot 2017-03-23 at 7.49.39 PM.png

    I started using migrationwiz and realized they weren't getting the exchange archives. But this is better and I can't believe no ones mentioned it in all the forums where people are trying to find a way to do it.



  • @JaredBusch said in Exporting mailboxes and archives from Office 365 without using Outlook.:

    I have this saved as powershell script named CreatePST.ps1 in C:\Scripts on the Exchange server.

    # To execute script, you must open an exchange powershell window, elevated permissions not required.
    
    # First you must be in the scripts directory.
    # cd \scripts
    
    # Then execute the powershell script with 3 parameters.
    # ./CreatePST.ps1 >First Name< >Last Name< >email alias< 
    # ./CreatePST.ps1 Jared Busch jbusch
    
    # The export path is not a variable as we need to know that it is writable by the system.
    
    param (
        [string]$FirstName = $(throw "-FirstName is required."),
        [string]$LastName = $(throw "-LastName is required."),
    	[string]$alias = $(throw "-alias is required.")
    )
    
    New-MailboxExportRequest -Mailbox "$alias" -FilePath "\\server\share\PSTExports\$FirstName.$LastName.pst"
    Write-Host ""
    Write-Host "To check status, run: Get-MailboxExportRequest | Get-MailboxExportRequestStatistics"
    

    to my knowledge, there is no comparable feature for Office 365.

    Most people recommend you use Outlook.

    This is a killer script though. I was on the verge of setting up a local exchange server, migrating mailboxes in hybrid mode to the local install and running this script from there.