I need to create some script for import pst users archives to EXCHANGE 2010 sp1 database.
Mail archives stored on single file server \\FILE-SERVER\PST\%Username%\
An amount and name of files is different for each of users.
Example:
\\FILE-SERVER\PST\Andy\archive.pst
\\FILE-SERVER\PST\Andy\archive2.pst
\\FILE-SERVER\PST\Andy\Andy-old.pst
It's needed to do a script which would execute next actions:
1. Ask for username (input from keyboard or as parameter)
2. Get a list of files for every username in folder \\FILE-SERVER\PST\%Username%\
3. Create a command line (New-MailboxImportRequest-Mailbox%username%-Name"filename" -IsArchive -BaditemLimit 45 -FilePath '\\FILE-SERVER\PST\%Username\filename.pst')