Validating specific folder names exist within Exchange 2010 mailboxes

Unanswered Validating specific folder names exist within Exchange 2010 mailboxes

  • Thursday, February 07, 2013 6:28 PM
     
     

    In Exchange 2010, we are pushing out managed folders by assigning a mailbox policy to members of a group. The policy creates these exact 3 folders in each mailbox:

    2Year
    5Year
    7Year

    On very rare occurrence, the managed folder process fails on one or more folders in a mailbox. We're looking for a way to validate whether these folders exist within the mailbox. The folders are always named the same in every mailbox.

    I can run the loop below to return these managed folders that exist within every mailbox in the group. Is there a way to specifically test whether these specific folders exist within each mailbox? 

    $users = (Get-Group -identity "Group Name").members
    foreach($mbx in $users){ 
    Get-ManagedFolder -mailbox $mbx | select @{n="DisplayName";e={$mbx.name}},foldername 
    }

    When I run this I will generally see each mailbox listed 3  unless there was a problem creating one of the folders. I want to find those mailboxes that are missing one or more of these folders.

    Smith, John          7Year
    Smith, John          5Year
    Smith, John          2Year

All Replies