Link to home
Start Free TrialLog in
Avatar of BMI-IT
BMI-IT

asked on

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?
Avatar of npinfotech
npinfotech
Flag of United States of America image

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
SOLUTION
Avatar of James H
James H
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of BMI-IT
BMI-IT

ASKER

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
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of BMI-IT

ASKER

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
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
Avatar of BMI-IT

ASKER

Ok , instead of a group, could I assign rights to a user instead of a group?
Yes, you can choose one user but it makes administration easier for a group.
Avatar of BMI-IT

ASKER

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
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.