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
7YearOn 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- Moved by Bill_StewartMicrosoft Community Contributor Thursday, February 07, 2013 6:34 PM Move to more appropriate forum
All Replies
-
Monday, February 11, 2013 1:40 AM
Get-MailboxFolderStatistics http://technet.microsoft.com/en-us/library/aa996762(v=exchg.141).aspx would probably be the best way if you want to do this in the Exchange Management Shell. It will only return information about real mailbox folders. Otherwise you could use EWS to search for the existance of the folder.
Cheers
Glen

