Quantcast
Viewing all articles
Browse latest Browse all 8719

How to remove 10k mailboxes Exchange 2013 (not AD users) with powershell

Hiya,

I've got a pollution of 10k mailboxes in my Exchange 2013. I would like to remove them in the fastest way and that is imo through powershell. Problem is that I am not the best powershell user out there and I need to save 3 mailboxes out the whole 10472 mailboxes...

The mailboxes have never been used and none of 10472 users have logged in yet.

I was thinking of using :

Get-MailboxStatistics | where {$_.LastLogonTime -lt (get-date).addDays(-90)} | Disable-Mailbox  

but I don't think this would work...

Some help would be much appreciated.



Viewing all articles
Browse latest Browse all 8719

Trending Articles