Forum Discussion

ClaudiaWalter's avatar
ClaudiaWalter
Copper Contributor
Dec 08, 2022

Outlook 2016: How to delete Folder with Exchange Server Script

How can I delet a folder of a user with Exchange Server skript?

  • Etheros's avatar
    Etheros
    Copper Contributor
    Hallo Claudia, Are you talking about a mailbox folder or a Public Folder? Can you give an example?
    • ClaudiaWalter's avatar
      ClaudiaWalter
      Copper Contributor
      Outlook has automatically create draft Folder eg draft1, draft2,....draft32. Now I want to delete this draft folders. The permission is standard none and anonymous none. When I delete it within outlook I get the message you have no permission. The Idea is now to do with a script at the exchange server
      • Etheros's avatar
        Etheros
        Copper Contributor
        In Exchange PowerShell with admin rights, you could try this one:

        get-mailbox -Identity name | Export-mailbox -DeleteContent -IncludeFolders "\draft1"

Resources