Forum Discussion

sandrine_goetha's avatar
6 years ago

Delete empty folder from Vault Search.

I want for 1 user to delete 1 emtpy folder in the search page.

Is there a way to do it without using the registry key ? I can afford to let this run I have few thousand users per server ( it would kill my machine).

When I try to do it in the web interface, I get that I can't delete because the folder exist in Exchange.

I'm using EV12.4 for exchange with exchange 2010 and exchange 2016 ( mixed environment).

Thank you for any tips or solutions

Sandrine

  • If you can find the folder's VaultEntryId, you can do this in PowerShell on the EV server:

    $cmApi = New-Object -ComObject EnterpriseVault.ContentManagementAPI
    $folder = $cmApi.ArchiveFolder
    $folder.Id = 'PasteYourVaultEntryIdHere'
    $folder.Delete()

    Note that the deletion will fail if the folder contains any items or subfolders (even empty subfolders), or if the account running the command does not have Delete permissions to the containing archive.

     

    The folder's VaultEntryId is listed in the ArchiveFolderView in the Directory database. An example of how you might find it based on the ArchiveID and the folder name is this SQL query:

    USE EnterpriseVaultDirectory
    GO

    SELECT VaultEntryId FROM ArchiveFolderView WHERE ArchiveVEID = 'PasteYourArchiveIdHere' AND FolderName LIKE '%PasteNameOfYourFolderHere%'

    Hope that helps!

    --Chris

    • sandrine_goetha's avatar
      sandrine_goetha
      Level 6

      Thank you so much to both of you.

      Chris you have exactly the answer I was searching for , I didn't test it yet but I was anyway thinking at this direction.

      AnroldMathias thank you for your time but we don't have virtual vault, being an heterogeneous environment all what the users have at their disposal is the Web search.

       

      Thanks to both of you

      Sandrine

  • Verify if the folder in question actually exists in Exchange.

    If Vault Cache and Virtual Vault are enabled for that specific user, delete the empty folder from Virtual Vault, and then initiate a Vault Cache Sync to update the Enterprise Vault archive folders with the desired changes.

    Or else, you may export the archive to PST, delete the archive, and then create a new archive while importing the PST (minus the empty folder in question).