• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 780
  • Last Modified:

export-mailbox syntax

looking to  export and clean the sent Items folder on a users mailbox, I have the syntax but its not working

example

Export-Mailbox -Identity user@example.com -TargetMailbox me@example.com -TargetFolder saved –IncludeFolders \sentitems

is this correct?
0
BMI-IT
Asked:
BMI-IT
  • 6
  • 4
  • 2
  • +1
4 Solutions
 
npinfotechCommented:
You might have to enable the account you're using with the Mailbox Import Export role:

http://www.exchangemaster.net/index.php?option=com_content&task=view&id=151&Itemid=1&lang=en
0
 
James HIT DirectorCommented:
Syntax is wrong...
Export-mailbox is now New-MailboxExportRequest

http://technet.microsoft.com/en-us/library/ff607299.aspx
0
 
ash007Commented:
0
Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

 
BMI-ITAuthor Commented:
Tried the info contained in that link and getting this error


The term 'Export-Mailbox' is not recognized as the name of a cmdlet, function, script file, or operable program.
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:15
+ Export-Mailbox <<<<  -Identity me@mydomain.com -PSTFolderPath C:\joe.pst
    + CategoryInfo          : ObjectNotFound: (Export-Mailbox:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
0
 
James HIT DirectorCommented:
OK.. as I stated, Export-Mailbox is not a valid command for Exchange 2010.
You need to use New-MailboxExportRequest.
Please see link on previous post for further instructions.
0
 
BMI-ITAuthor Commented:
ok should have mentioned that this is exchange 2010.

so im using

New-MailboxExportRequest -Mailbox user@domain -FilePath C:\pst\user.pst

the c: drive is on the exchange server (called exchange)

but i keep getting this error

A positional parameter cannot be found that accepts argument 'user@comain.com'.
    + CategoryInfo          : InvalidArgument: (:) [New-MailboxExportRequest], Para
    + FullyQualifiedErrorId : PositionalParameterNotFound,New-MailboxExportRequest
0
 
James HIT DirectorCommented:
You are missing the needed rights. Please follow these directions.

http://technet.microsoft.com/en-us/library/ee633452.aspx
0
 
James HIT DirectorCommented:
Once you completed the rights, log off and log back on for it to take effect. You should be able to see and use the export command.
0
 
BMI-ITAuthor Commented:
Ok , instead of a group, could I assign rights to a user instead of a group?
0
 
James HIT DirectorCommented:
Yes, you can choose one user but it makes administration easier for a group.
0
 
BMI-ITAuthor Commented:
Thanks,

sorry if this sounds dumb,  would I use our administrator group (called administrator) to do do this?
 
We really only use one account  to admin exchange
0
 
James HIT DirectorCommented:
Yes, just use the "Administrators" group.
0
 
npinfotechCommented:
Apologies, but the link I provided in the first response not only had the right syntax for 2010, but also details how to assign the proper rights and roles needed to perform the task.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

  • 6
  • 4
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now