# Delete Exchange Online empty folders

**URL:** <https://forums.powershell.org/t/delete-exchange-online-empty-folders/8296>\
**Category:** PowerShell Help\
**Created:** [March 26, 2017, 1:56am UTC](https://forums.powershell.org/t/delete-exchange-online-empty-folders/8296 "2017-03-26T01:56:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rogozin](https://avatars.discourse-cdn.com/v4/letter/r/48db29/32.png) [@rogozin](https://forums.powershell.org/u/rogozin)\
**Post date:** [March 26, 2017, 1:56am UTC](https://forums.powershell.org/t/delete-exchange-online-empty-folders/8296/1 "2017-03-26T01:56:09Z")

</div>

Hi All,  
Short question, is it possible to delete empty folders in Exchange Online via powershell?  
The problem is a users have tons of folders in their inboxes which became empty after online archive retention.  
I tried to search empty folders by Get-MailboxFolderStatistics and pass folders ids to new-compliancesearch for remove them after, but unfortunately search folders by folder id is not working atm in Exchange Online (btw, does anybody know why?).  
Any ideas?  
Thank you very much.

---

<div class="post-metadata">

**Author:** ![donj](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/donj/32/137_2.png) [@donj](https://forums.powershell.org/u/donj)\
**Post date:** [March 27, 2017, 6:28am UTC](https://forums.powershell.org/t/delete-exchange-online-empty-folders/8296/2 "2017-03-27T06:28:36Z")

</div>

The O365 commands aren’t super-geared toward managing individual items like folders. I think the general theory is that, if the empty users are bothering the user, they’ll delete them on their own.

---

<div class="post-metadata">

**Author:** ![rogozin](https://avatars.discourse-cdn.com/v4/letter/r/48db29/32.png) [@rogozin](https://forums.powershell.org/u/rogozin)\
**Post date:** [March 27, 2017, 6:38am UTC](https://forums.powershell.org/t/delete-exchange-online-empty-folders/8296/3 "2017-03-27T06:38:23Z")

</div>

Don, thanks for your reply.  
Users may have tons of empty folders and sometimes its not possible to delete them on their own.

---

<div class="post-metadata">

**Author:** ![donj](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/donj/32/137_2.png) [@donj](https://forums.powershell.org/u/donj)\
**Post date:** [March 27, 2017, 6:42am UTC](https://forums.powershell.org/t/delete-exchange-online-empty-folders/8296/4 "2017-03-27T06:42:45Z")

</div>

I get it - I was just trying to explain Microsoft’s general philosophy, not that it’s perfect for everyone.

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:39pm UTC](https://forums.powershell.org/t/delete-exchange-online-empty-folders/8296/5 "2024-05-16T20:39:01Z")

</div>

Closed on May 16, 2024, 8:39pm UTC


