Exchange Archive - Delete Empty Folders
Hello - I have a user who has > 14,000 user-created subfolders in an Outlook mailbox. Yes, that's correct, 14,000 folders. This user has Exchange archiving enabled and archiving moves the messages from the production mailbox to the archive mailbox like it should and all is good there.... The problem is that once all the messages have been moved, there are still a ton of empty subfolders left in the mailbox. I want to know if there is a setting, retention policy, or something that can be enabled that will delete all empty folders. I found some scripts out there but none of them are real clear to me as to how or where to run them. Here are links to a few that I found: http://gsexdev.blogspot.com/2013/01/cleaning-out-skeletons-in-your-mailbox.html (search for skeletons in closet) http://social.technet.microsoft.com/Forums/en/ITCG/thread/5da9aa67-f796-4471-b638-ead6263d554a (while not my thread, a similar question exists, at the bottom) Am I missing something? Is there a setting? Do I need to use a script to do this? How are others handling this? Thanks!!
February 23rd, 2013 1:40pm

Hi If you want to delete empty folders from mailbox you need to get access to mailbox from powershell. This is possible only when you use EWS. Those scripts from your post are using EWS, so you have to download and install the Exchange Web Services Managed API. Here you can find more informations how to do this: http://blogs.technet.com/b/heyscriptingguy/archive/2011/12/02/learn-to-use-the-exchange-web-services-with-powershell.aspx Remigiusz ExchangeBlog
Free Windows Admin Tool Kit Click here and download it now
February 23rd, 2013 2:12pm

On Sat, 23 Feb 2013 18:36:50 +0000, jpc0706 wrote: > > >Hello - I have a user who has > 14,000 user-created subfolders in an Outlook mailbox. Yes, that's correct, 14,000 folders. This user has Exchange archiving enabled and archiving moves the messages from the production mailbox to the archive mailbox like it should and all is good there.... > >The problem is that once all the messages have been moved, there are still a ton of empty subfolders left in the mailbox. I want to know if there is a setting, retention policy, or something that can be enabled that will delete all empty folders. I found some scripts out there but none of them are real clear to me as to how or where to run them. Here are links to a few that I found: > >http://gsexdev.blogspot.com/2013/01/cleaning-out-skeletons-in-your-mailbox.html (search for skeletons in closet) > >http://social.technet.microsoft.com/Forums/en/ITCG/thread/5da9aa67-f796-4471-b638-ead6263d554a (while not my thread, a similar question exists, at the bottom) > >Am I missing something? Is there a setting? Do I need to use a script to do this? How are others handling this? No, there's no "setting". Yes, you'd have to script this. As an alternative you could just find all the folders in a mailbox that have a "0" item count and ask the user to clean up the mailbox. Your last link provides that script. --- Rich Matheisen MCSE+I, Exchange MVP --- Rich Matheisen MCSE+I, Exchange MVP
February 23rd, 2013 5:35pm

On Sat, 23 Feb 2013 18:36:50 +0000, jpc0706 wrote: > > >Hello - I have a user who has > 14,000 user-created subfolders in an Outlook mailbox. Yes, that's correct, 14,000 folders. This user has Exchange archiving enabled and archiving moves the messages from the production mailbox to the archive mailbox like it should and all is good there.... > >The problem is that once all the messages have been moved, there are still a ton of empty subfolders left in the mailbox. I want to know if there is a setting, retention policy, or something that can be enabled that will delete all empty folders. I found some scripts out there but none of them are real clear to me as to how or where to run them. Here are links to a few that I found: > >http://gsexdev.blogspot.com/2013/01/cleaning-out-skeletons-in-your-mailbox.html (search for skeletons in closet) > >http://social.technet.microsoft.com/Forums/en/ITCG/thread/5da9aa67-f796-4471-b638-ead6263d554a (while not my thread, a similar question exists, at the bottom) > >Am I missing something? Is there a setting? Do I need to use a script to do this? How are others handling this? No, there's no "setting". Yes, you'd have to script this. As an alternative you could just find all the folders in a mailbox that have a "0" item count and ask the user to clean up the mailbox. Your last link provides that script. --- Rich Matheisen MCSE+I, Exchange MVP --- Rich Matheisen MCSE+I, Exchange MVP
Free Windows Admin Tool Kit Click here and download it now
February 24th, 2013 1:31am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics