LukasSMSFT The_Exchange_Team Hi Lukas, I've finally managed to get the script running against our Exchange Online mailboxes using the following syntax:
Get-ExoMailbox -ResultSize Unlimited | .\CVE-2023-23397.ps1 -Environment "Online" -DLLPath "C:\\microsoft.exchange.webservices.2.2.0\lib\40\Microsoft.Exchange.WebServices.dll" -UseSearchFolders
The issue here is that for so many mailboxes (We have almost 9000 mailboxes in the environment), the script is unable to access the mailboxes with the following error:
"Unable to process mailbox email address removed for privacy reasons as it seems to be inaccessible. Inner Exception:
Exception calling "Bind" with "2" argument(s): "Object reference not set to an instance of an object."
I have GA permissions and checking a few of those inaccessible mailboxes they are active and licensed. Nothing sticks out. I even ran the script against one of those inaccessible mailboxes with the same result!
Any ideas how I can resolve this to get the script to access and check those mailboxes?