Jun 05 2019 09:50 PM
Jun 05 2019 09:50 PM
ow do you search a group mailbox.
Search-Mailbox -Identity "firstname.lastname@example.org" -SearchQuery 'Subject:"Hello"' -TargetMailbox email@example.com -TargetFolder "Inbox"
When I try to search the group mailbox I get the error message. The operation couldn't be performed because object 'firstname.lastname@example.org' couldn't be found on 'xxxxxx.PROD.OUTLOOK.COM'.
But when I search for the mailbox I can find it.
Get-Mailbox -GroupMailbox -Identity "email@example.com"
Is it because it is a group mailbox? How do you search a group mailbox?
Jun 05 2019 11:23 PM
Yup, group mailboxes are not supported. Use eDiscovery/Content search in the Security and compliance center.
Jun 06 2019 12:42 PM
I have the eDiscovery Administrator role.
Is there a way to batch delete emails from a group mailbox.
I have a testing application that has sent a lot of emails to that group mailbox.
I wish to empty the entire group mailbox.
Whats the best way to do this?
Jun 06 2019 11:57 PM
You can use some EWS-based script, or simply recreate the group. Should also be possible to select all messages via Outlook and delete them in one go, but I've only tested this with groups with handful of messages.
Jun 10 2019 04:59 PM
Is this what you a referring to when you say EWS-based scripts?
I am currently looking through the documentation trying to figure out how to get the mailbox or folder.
I have tried the select and delete all using the desktop and web client but it doesn't seem to do anything thing when I click delete all.
I can delete in batches on what is displayed on the screen. But it a tedious repetitive process. I would just like a script I can run that deletes all.
Jun 10 2019 11:10 PM
Yup, that's what I'm referring to, and here's an article that talks about using EWS for Groups: https://gsexdev.blogspot.com/2015/05/using-office-365-groups-within-ews.html
You can of course also use the Graph API: https://docs.microsoft.com/en-us/graph/api/group-get-conversation?view=graph-rest-1.0&tabs=cs
Jun 11 2019 12:17 AM
Just had a look at https://gsexdev.blogspot.com/2015/05/using-office-365-groups-within-ews.html but it seems to be referencing
I have installed the Microsoft Exchange Web Services Managed API 2.2
But can't find that Groups Library.
I can find in the open source library
But I don't think is been implemented in 2.2.
I will continue to read the documentation