Forum Discussion

binodmaharjan_2020's avatar
binodmaharjan_2020
Copper Contributor
Jul 08, 2024

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

  • Search-Mailbox works just fine on-premises, it's only deprecated in Exchange Online.
    • binodmaharjan_2020's avatar
      binodmaharjan_2020
      Copper Contributor
      hi,
      Search-Mailbox command does not work in Exchange On-Premise 2019 server. I tried with importing command but not worked.

Resources