FN-GM Posted February 25, 2013 Posted February 25, 2013 Hi, Using the New-MailboxExportRequest cmdlet how do i empty the source mailbox please? Thanks
sukh Posted February 25, 2013 Posted February 25, 2013 You cant, you will have to use the search-mailbox with the -deletecontent zwitch as a seperate cmdlet.
FN-GM Posted May 4, 2013 Author Posted May 4, 2013 (edited) 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 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 or i could pipe it? 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 Thanks Edited May 4, 2013 by FN-GM
sukh Posted May 17, 2013 Posted May 17, 2013 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.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now