Forum Discussion
binodmaharjan_2020
Jul 08, 2024Copper Contributor
How can we empty Deleted Item Folders from On-premises Exchange server using script?
Scenario: As i am migrating the mailbox, requirement is to empty the mailbox's deleted items folder and instead of doing manually to individual usermailbox, i tried to do from Exchange Management shell using command.
Search-Mailbox parameter command is deprecated so i cannot use those command as suggested in the internet related articles.
How can i empty deleted item folders from Mailbox server?
3 Replies
- chrisslrothBrass ContributorHi binodmaharjan_2020, maybe there is a solution with EWS.
Check this: https://github.com/David-Barrett-MS/PowerShell-EWS-Scripts/wiki - Search-Mailbox works just fine on-premises, it's only deprecated in Exchange Online.
- binodmaharjan_2020Copper Contributorhi,
Search-Mailbox command does not work in Exchange On-Premise 2019 server. I tried with importing command but not worked.