Hi Everyone.
Every month we have to export around 50 to100 mailbox to PST for users leaving process and the below command we use to export for each users manually.
Command : New-MailboxExportRequest -Mailbox AylaKol -FilePath \\MBX-01\PSTFileShare\Ayla.pst
I would like to export the list of user's mailbox using a script and I got the below commands from another forum and tried to export with 2 test mailboxs.
Mailbox were queued as mentioned below,But the result is only one .pst file generate named ".PST".
[PS] C:\>$Export = Get-Content .\Users\exadmin\Desktop\Mailbox.txt
[PS] C:\>$Export|%{$_|New-MailboxExportRequest -FilePath "\\servername\D$\Export\PST\$($_.alias).pst"}
Name Mailbox Status
---- ------- ------
MailboxExport ch.india.com/Non ch accounts/Users/Ram... Queued
MailboxExport ch.india.com/Non ch accounts/Users/Kha... Queued
Please advise if I need to change any think in the command or kindly share any script
Thanks.