# Total count of inactive mailbox and date of deletion

**URL:** <https://forums.powershell.org/t/total-count-of-inactive-mailbox-and-date-of-deletion/22429>\
**Category:** PowerShell Help\
**Created:** [June 7, 2023, 2:49am UTC](https://forums.powershell.org/t/total-count-of-inactive-mailbox-and-date-of-deletion/22429 "2023-06-07T02:49:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![newbie2023](https://avatars.discourse-cdn.com/v4/letter/n/c77e96/32.png) [@newbie2023](https://forums.powershell.org/u/newbie2023)\
**Post date:** [June 7, 2023, 2:49am UTC](https://forums.powershell.org/t/total-count-of-inactive-mailbox-and-date-of-deletion/22429/1 "2023-06-07T02:49:46Z")

</div>

hi, can someone point me in the right direction to create a script that:

1. counts total number of inactive mailboxes
2. date of deletion of each of those mailboxes
3. identify these users

====

1. list down all soft deleted users
2. bulk remove them

Thanks!

---

<div class="post-metadata">

**Author:** ![krzydoug](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/krzydoug/32/1008_2.png) [@krzydoug](https://forums.powershell.org/u/krzydoug)\
**Post date:** [June 7, 2023, 4:28am UTC](https://forums.powershell.org/t/total-count-of-inactive-mailbox-and-date-of-deletion/22429/2 "2023-06-07T04:28:07Z")

</div>

Hello newbie,

Without knowing what stage you’re at, it’s hard to guess. I generally start at bing or google and start searching. If you do end up needing assistance, please be sure to add as many details as you can (what platform your email is hosted on comes to mind first…) Help us help you, as the saying goes. 🙂

---

<div class="post-metadata">

**Author:** ![newbie2023](https://avatars.discourse-cdn.com/v4/letter/n/c77e96/32.png) [@newbie2023](https://forums.powershell.org/u/newbie2023)\
**Post date:** [June 7, 2023, 8:31am UTC](https://forums.powershell.org/t/total-count-of-inactive-mailbox-and-date-of-deletion/22429/3 "2023-06-07T08:31:52Z")

</div>

for number 1, would this work? (get-EXOMailbox -InactiveMailboxOnly -ResultSize Unlimited).count

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [June 7, 2023, 8:55am UTC](https://forums.powershell.org/t/total-count-of-inactive-mailbox-and-date-of-deletion/22429/4 "2023-06-07T08:55:23Z")

</div>

Since a “_get_” cmdlet is about to retrieve - not write or change - some data, what do you think bad could happen when you simply tried it? 🤔 😏

---

<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:14pm UTC](https://forums.powershell.org/t/total-count-of-inactive-mailbox-and-date-of-deletion/22429/5 "2024-05-16T20:14:53Z")

</div>

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


