lianne143
asked on
How to forcefully delete all the disconnected mailboxes at one go \ batch by batch.
Hi
I have 100 of users who have left our organisation in the past and their mailboxes has not been deleted.
Now I have deleted their mailboxes and lists all the deleted mailbox with their Display names and MailboxGuid , when I give the following command.
Get-MailboxStatistics | where-object { $_.DisconnectDate -ne $null } | Select DisplayName,MailboxGuid
I know how to forcefully delete the mailbox by entering the following command and putting the relevant MailboxGuid one by one. It will take lot of time if I go on this method.
[PS] C:\Windows\system32>Remove -Mailbox -Database "Mailbox Database" -StoreMailboxIdentity "a31fb8b5-14ee-4509-834e-4 09d2ea3fe3 8" -confirm:$true
Confirm
Are you sure you want to perform this action?
Removing store mailbox "a31fb8b5-14ee-4509-834e-4 09d2ea3fe3 8" on database
"Exchange.domain.local\Mai lbox Database".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help
(default is "Y"):y
[PS] C:\Windows\system32>
Is there a easy way of forcefully deleting the disconnected mailboxes at one go.
Any help will be great.
Thanks
I have 100 of users who have left our organisation in the past and their mailboxes has not been deleted.
Now I have deleted their mailboxes and lists all the deleted mailbox with their Display names and MailboxGuid , when I give the following command.
Get-MailboxStatistics | where-object { $_.DisconnectDate -ne $null } | Select DisplayName,MailboxGuid
I know how to forcefully delete the mailbox by entering the following command and putting the relevant MailboxGuid one by one. It will take lot of time if I go on this method.
[PS] C:\Windows\system32>Remove
Confirm
Are you sure you want to perform this action?
Removing store mailbox "a31fb8b5-14ee-4509-834e-4
"Exchange.domain.local\Mai
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help
(default is "Y"):y
[PS] C:\Windows\system32>
Is there a easy way of forcefully deleting the disconnected mailboxes at one go.
Any help will be great.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.