Exchange Online - How to export psd file via PowerShell RRS feed

  • Question

  • Hello

    We want to archive user data via PowerShell.
    The following command doesn't work:

    New-MailboxExportRequest  [-Name ] -Mailbox  -FilePath  [-IsArchive] [-SourceRootFolder ] [-TargetRootFolder ] [-IncludeFolders ,...] [-ExcludeFolders ,...] [-ContentFilter ] [-Priority ]

    The following Message appears:
    "PS C:\DEV\Office 365\powershell_scripts> New-MailboxExportRequest -Mailbox "prename.name@domain.com" -FilePath "C:\Users\Public\Desktop\"

    New-MailboxExportRequest : Die Benennung "New-MailboxExportRequest" wurde nicht als Name eines Cmdlet, einer Funktion,
    einer Skriptdatei oder eines ausführbaren Programms erkannt. Überprüfen Sie die Schreibweise des Namens, oder ob der
    Pfad korrekt ist (sofern enthalten), und wiederholen Sie den Vorgang.
    In Zeile:1 Zeichen:1
    + New-MailboxExportRequest -Mailbox "prename.name@domain.com" -FilePat ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (New-MailboxExportRequest:String) [], CommandNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException"

    Can someone help us?

    Kind regards

    Tuesday, December 18, 2018 10:04 AM

All replies

  • You mean PST? .. not PSD 

    The best way to export mail box to PST Exchange Online is to use Office 365 Compliance center.

    Please refer the below blog for step by step proceedure ..


    Hope this helps !

    Wednesday, December 19, 2018 1:04 AM
  • Yes I meant PST.

    Thank you for your reply.
    I already knew this variant.

    But we are looking for an automated way via PowerShell.

    Do you know a way to do that via PowerShell?

    Kind regards
    Wednesday, December 19, 2018 8:20 AM

  • You can automate the PowerShell Scripts from Task Scheduler


    Hope this helps...


    Please don't forget to “mark the replies as answers if they helped, also set "like" it’s a boost for us to keep blogging J

    Sunday, December 23, 2018 2:19 PM
  • Hello Ganesan

    Unfortunately it didn‘t help.

    The problem is not the automatation of PowerShell scripts. The problem is that the CMDLET New-MailboxExportRequest is not working and I didn‘t found an alternative yet...

    But thank you for your input.

    Kind regards

    Wednesday, December 26, 2018 9:53 AM
  • Please try this ..and let me know 

    Run :  New-ManagementRoleAssignment -Role "Mailbox Import Export" -User UserName(it is the user that you are using to run the command new-mailboxexportrequest)  

    Log off and login after.

    Also have a look at this forum related to this : https://social.technet.microsoft.com/Forums/en-US/d6bbff4b-8be0-4b4f-925d-1c5db5c31cc4/newmailboxexportrequest-is-not-recognized-as-the-name-of-a-cmdlet?forum=exchangesvrgenerallegacy

    • Proposed as answer by Hotaka Thursday, December 27, 2018 8:29 AM
    Wednesday, December 26, 2018 2:44 PM
  • Hello Ganesan

    Thank you very much for this answer.
    Unfortunately this didn't work too.

    I've done it exactly like discribed:

    PS C:\DEV\Office 365\powershell_scripts> New-ManagementRoleAssignment -Role "Mailbox Import Export" -User adress@companyname.onmicrosoft.com
    Name                           Role                                            RoleAssigneeName                                RoleAssigneeType                                AssignmentMethod                                EffectiveUserName
    ----                           ----                                            ----------------                                ----------------                                ----------------                                -----------------
    Mailbox Import Export-usern... companyname.onmicrosoft.com\Mailbox Import Export   support                                         User                                            Direct

    After the Assignment I disconnected myself, and destroyed the session.
    I logged in myself to the security and compliance console via PowerShell again and didn't found the Command New-MailboxExportRequest (command: 'Get-Command -Name "*Export*"')

    After the try with New-MailboxExportRequest I got the same message like before. (Cmdlet not recognized)

    Maybe it is important to know, that it is an Exchange Online Server...

    Kind regards

    Wednesday, January 2, 2019 8:16 AM
  • Hello everybody

    I contacted the MS support a few minutes ago I got this answer:

    Module: exchange
    Applies to:Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019
    This cmdlet is available only in on-premises Exchange.”

    And because I have an Exchange Online server it won't work with "New-MailboxExportRequest".

    Does anyone knows an alternative for this command which work on Exchange Online server?

    Kind regards

    Wednesday, January 2, 2019 8:33 AM