Link to home
Start Free TrialLog in
Avatar of bhieb
bhieb

asked on

Remove all soft deleted mailboxes Exchange 2010 SP1

So I found this command on technet.

Get-MailboxStatistics -Database Mailbox2 | where {$_.DisconnectReason -eq "SoftDeleted"} | foreach {Remove-StoreMailbox -Database $_.database -Identity $_.mailboxguid -MailboxState SoftDeleted -confirm:$false}

Open in new window


It sort of works in that it will remove some of the soft deleted boxes, but I have to run it severl times, and then it will usually leave me with a dozen or so to manually remove. I'm splitting a DB, and every move leaves a dc'd maiblox. This is the error I get.

Pipeline not run because a pipeline is already running. Pipelines cannot be run concurrently.
    + CategoryInfo          : OperationStopped: (Microsoft.Power...tHelperRunspace:ExecutionCmdletHelperRunspace) [],
   PSInvalidOperationException
    + FullyQualifiedErrorId : RemotePipelineExecutionFailed

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Bruno PACI
Bruno PACI
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bhieb
bhieb

ASKER

Perfect thanks!