Import multiple PST files to archive database

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.






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')

No Data
Reply Children
No Data