locked
Exchange Management Shell - What does this mean? RRS feed

  • Question

  • Hi,

    I'm trying to export a user's mailbox using the following command

     

    ExportMailbox -Identity firstname.lastname -StartDate "1/1/2001" -EndDate "1/1/2008" -PSTFolderPath C:\PST's\firstname.lastname.pst

     

    When I press enter, nothing hapens except management shell drops to another line starting with >>

     

    What should I be typing into here?

     

    Thanks


    Ashley

    Monday, October 10, 2011 8:57 AM

Answers

  • Hi,

    Here are some links and on the end an example on a command for exporting mailbox to pst file

    http://blogs.technet.com/b/exchange/archive/2007/04/13/3401913.aspx

    http://technet.microsoft.com/en-us/library/bb266964%28EXCHG.80%29.aspx

    http://technet.microsoft.com/en-us/library/aa998579%28EXCHG.80%29.aspx

    Export-Mailbox -Identity john@contoso.com -PSTFolderPath C:\PSTFiles\john.pst

     


    Jonas Andersson | Microsoft Community Contributor Award 2011 | MCITP: EMA 2007/2010 | Blog: http://www.testlabs.se/blog | Follow me on twitter: jonand82
    • Proposed as answer by Jason LJS Wednesday, October 12, 2011 1:29 AM
    • Marked as answer by Jason LJS Monday, October 17, 2011 1:07 AM
    Monday, October 10, 2011 11:20 AM
  • Hello,

    the problem might be the apostrophe in the folder "PST's". Please try a folder like "PSTs" or something else.

    Greetings,

    Toni

    • Proposed as answer by Jason LJS Wednesday, October 12, 2011 1:29 AM
    • Marked as answer by Jason LJS Monday, October 17, 2011 1:07 AM
    Monday, October 10, 2011 1:41 PM
  • On Mon, 10 Oct 2011 08:57:42 +0000, xxAsHxx wrote:
     
    >
    >
    >Hi,
    >
    >I'm trying to export a user's mailbox using the following command
    >
    >
    >
    >ExportMailbox -Identity firstname.lastname -StartDate "1/1/2001" -EndDate "1/1/2008" -PSTFolderPath C:\PST's\firstname.lastname.pst
    >
    >
    >
    >When I press enter, nothing hapens except management shell drops to another line starting with >>
    >
    >
    >
    >What should I be typing into here?
     
    Both '"' and "'" characters are used to delimit strings. There's an
    apostrophe in the name of the "PST's" directory.
     
    You can make that work by either surrounding the string with a '"'
    delimiter, or by escaping the apostrophe by preceding it with a
    back-tick character:
     
    -PSTFolderPath "C:\PST's\firstname.lastname.pst"
    -PSTFolderPath C:\PST`'s\firstname.lastname.pst
     
    ---
    Rich Matheisen
    MCSE+I, Exchange MVP
     

    --- Rich Matheisen MCSE+I, Exchange MVP
    • Proposed as answer by Jason LJS Wednesday, October 12, 2011 1:29 AM
    • Marked as answer by Jason LJS Monday, October 17, 2011 1:07 AM
    Monday, October 10, 2011 7:24 PM

All replies

  • Hi,

    Here are some links and on the end an example on a command for exporting mailbox to pst file

    http://blogs.technet.com/b/exchange/archive/2007/04/13/3401913.aspx

    http://technet.microsoft.com/en-us/library/bb266964%28EXCHG.80%29.aspx

    http://technet.microsoft.com/en-us/library/aa998579%28EXCHG.80%29.aspx

    Export-Mailbox -Identity john@contoso.com -PSTFolderPath C:\PSTFiles\john.pst

     


    Jonas Andersson | Microsoft Community Contributor Award 2011 | MCITP: EMA 2007/2010 | Blog: http://www.testlabs.se/blog | Follow me on twitter: jonand82
    • Proposed as answer by Jason LJS Wednesday, October 12, 2011 1:29 AM
    • Marked as answer by Jason LJS Monday, October 17, 2011 1:07 AM
    Monday, October 10, 2011 11:20 AM
  • Hello,

    the problem might be the apostrophe in the folder "PST's". Please try a folder like "PSTs" or something else.

    Greetings,

    Toni

    • Proposed as answer by Jason LJS Wednesday, October 12, 2011 1:29 AM
    • Marked as answer by Jason LJS Monday, October 17, 2011 1:07 AM
    Monday, October 10, 2011 1:41 PM
  • On Mon, 10 Oct 2011 08:57:42 +0000, xxAsHxx wrote:
     
    >
    >
    >Hi,
    >
    >I'm trying to export a user's mailbox using the following command
    >
    >
    >
    >ExportMailbox -Identity firstname.lastname -StartDate "1/1/2001" -EndDate "1/1/2008" -PSTFolderPath C:\PST's\firstname.lastname.pst
    >
    >
    >
    >When I press enter, nothing hapens except management shell drops to another line starting with >>
    >
    >
    >
    >What should I be typing into here?
     
    Both '"' and "'" characters are used to delimit strings. There's an
    apostrophe in the name of the "PST's" directory.
     
    You can make that work by either surrounding the string with a '"'
    delimiter, or by escaping the apostrophe by preceding it with a
    back-tick character:
     
    -PSTFolderPath "C:\PST's\firstname.lastname.pst"
    -PSTFolderPath C:\PST`'s\firstname.lastname.pst
     
    ---
    Rich Matheisen
    MCSE+I, Exchange MVP
     

    --- Rich Matheisen MCSE+I, Exchange MVP
    • Proposed as answer by Jason LJS Wednesday, October 12, 2011 1:29 AM
    • Marked as answer by Jason LJS Monday, October 17, 2011 1:07 AM
    Monday, October 10, 2011 7:24 PM
  • Hi,

    The command with "" characters works fine

    ExportMailbox -Identity firstname.lastname -StartDate "1/1/2001" -EndDate "1/1/2008" -PSTFolderPath "C:\PST's\firstname.lastname.pst"


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Wednesday, October 12, 2011 1:28 AM
  • Thanks for your help guys.....

     

    I took out the ' from PSTs and surrounded the file path string with ""

     

    The instruction seemed to start ok but then I received a message telling me that because i'm using a 64 bit computer I can't import/export pst's unless I use a 32 bit computer...................Back to square one !!

    Wednesday, October 12, 2011 7:43 AM
  • Hi,

    That's right.

    To export data from a .pst file, you must run the Export-Mailbox cmdlet from a 32-bit computer that has the following installed:

    • The 32-bit version of the Exchange management tools
    • Outlook 2003 Service Pack 2 (SP2) or Outlook 2007

    http://technet.microsoft.com/en-us/library/bb266964(EXCHG.80).aspx


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Thursday, October 13, 2011 7:12 AM
  • After finally getting around to running the export command, everything appears fine..... Exchange creates the PST in the location specified BUT doesn't seem to have removed anything from the users mailbox.......

    His mailbox is still the same size witht the same number emails in his various folders as before.....

    Any ideas?

     

    Thanks

     

    Wednesday, October 19, 2011 8:18 AM
  • Hi,

    You need to have the -deletecontent parameter on the command in order for it to remove mails after the export. Did you use that parameter?

    Leif

    Wednesday, October 19, 2011 8:32 AM
  • Hi,

     

    Oh ok, I didn't use that command.....

     

    This is the command I used

    Export-Mailbox -Identity gerry.connor -StartDate "01/01/2001" -EndDate "01/01/2008" -PSTFolderPath "C:\PST Files\gerry.connor.pst"

     

    Should it be written like this?

    Export-Mailbox -Identity gerry.connor -StartDate "01/01/2001" -EndDate "01/01/2008" -PSTFolderPath "C:\PST Files\gerry.connor.pst" -deletecontent

     

     

    Wednesday, October 19, 2011 8:37 AM
  • Wednesday, October 19, 2011 8:39 AM
  • Thanks for your help, I will try later.....
    Wednesday, October 19, 2011 8:54 AM