Link to home
Start Free TrialLog in
Avatar of Methodman85
Methodman85

asked on

Need help with Powershell Script for Exchange

I need a power-shell script that can take an existing users mailbox, and copy the folder structure of the mailbox, while only copying the messages in the various folders that are older than a certain date.

Thanks
Avatar of sunnyc7
sunnyc7
Flag of United States of America image

what version of exchange ?
SOLUTION
Avatar of sunnyc7
sunnyc7
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 Methodman85
Methodman85

ASKER

Is the only way to do this to a PST? I think that will work, I can just export the PST into the achieve mailbox.

You see the user does not want a PST file, she wants another "user" mailbox, because she wants everything stored on the server and nowhere else.

It's Exchange 2007
You can create another mailbox - called >USERarchive

Import the pst into that and load it as additional mailbox.

that's better than PST I think.
Indeed, that's what I'll do. Now another question. Since this is exporting to a PST file, it will just be creating a copy. It won't actually be moving the files. The reason I need to do this is because the users mailbox is approaching 9GB, so is there a way to turn this into an archive process, so that the files are actually moved?
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
It's asking me for TargetFolder parameter.
I want to keep the existing structure of the original mailbox. How can I do that?

[PS] C:\Documents and Settings\>export-Mailbox -Identity itsectest -TargetMailbox ARCTest -EndDate 8/22/2010

cmdlet Export-Mailbox at command pipeline position 1
Supply values for the following parameters:
TargetFolder:
If I say inbox it says.

StatusMessage                    : The target folder 'Inbox' is a special folder of target mailbox 'ARCTest', and is not supported by this command.
I will, I will use that to do a full backup before I try the archive and delete options. I'm prepping an XP x86 VM to do this.
I should have this fully tested by tomorrow.
Thanks.
Thanks!
I gave dm_mcelduff the main answer because this method saves me from having to manually go back to original mailbox and delete to old items.
Thanks for the points.