Hi,
Using the New-MailboxExportRequest cmdlet how do i empty the source mailbox please?
Thanks

Hi,
Using the New-MailboxExportRequest cmdlet how do i empty the source mailbox please?
Thanks
You cant, you will have to use the search-mailbox with the -deletecontent zwitch as a seperate cmdlet.

Hi @sukh as New-MailboxExportRequest runs in the back ground if i empty the mailbox on the next powershell command will it clear the mailbox before the export has finished?
This is my script i want to use
or i could pipe it?Code:Add-PSSnapin "Microsoft.Exchange.Management.PowerShell.Admin" $date = Get-Date -format "dd/MM/yyyy" New-MailboxExportRequest -Mailbox SVC-EXCH-JOURNLING -FilePath "\\fp-itstorage\exchangeexports$\$date.pst" Search-Mailbox -id "SVC-EXCH-JOURNLING" -DeleteContent -Force
ThanksCode:Add-PSSnapin "Microsoft.Exchange.Management.PowerShell.Admin" $date = Get-Date -format "dd/MM/yyyy" New-MailboxExportRequest -Mailbox SVC-EXCH-JOURNLING -FilePath "\\fp-itstorage\exchangeexports$\$date.pst" | Search-Mailbox -id "SVC-EXCH-JOURNLING" -DeleteContent -Force
Last edited by FN-GM; 4th May 2013 at 08:28 PM.

BUMP![]()
quick look it won't work. You would probably be better using Get-MailboxExportRequestStatistics to see if the export is complete then do the delete.
There are currently 1 users browsing this thread. (0 members and 1 guests)