Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete items limited to 10? #7

Open
Rai80 opened this issue Sep 25, 2019 · 1 comment
Open

Delete items limited to 10? #7

Rai80 opened this issue Sep 25, 2019 · 1 comment

Comments

@Rai80
Copy link

Rai80 commented Sep 25, 2019

I tried the script today, but seems like the Purge is limited to 10 items.

https://docs.microsoft.com/en-us/powershell/module/exchange/policy-and-compliance-content-search/new-compliancesearchaction?view=exchange-ps

A maximum of 10 items per mailbox can be removed at one time. Because the capability to search for and remove messages is intended to be an incident-response tool, this limit helps ensure that messages are quickly removed from mailboxes. This action isn't intended to clean up user mailboxes.

@jdgregson
Copy link
Owner

I wasn't aware of this limitation, thanks for bringing it to my attention. I intended for this to be an incident response tool, so I haven't encountered a situation where there were more then 10 items in a single mailbox.

As this is an intentional limitation on Microsoft's end, it will be difficult to work around. In the short term I should add a warning if more than 10 items are found in a single mailbox. In the long term I may be able to refactor it so that it will loop over mailboxes with more than 10 results and delete them 10 at a time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants