When I try to run the script against my online mailboxes, I get what you see below. I ran the script as follows:
Get-EXOMailbox -ResultSize Unlimited | .\CVE-2023-23397.ps1 -Environment "Online"
ResultGet-Process : A positional parameter cannot be found that accepts argument 'Get-EXOMailbox'.
At line:1 char:1
+ PS C:\> Get-EXOMailbox -ResultSize Unlimited | .\CVE-2023-23397.ps1 - ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Get-Process], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.GetProcessCommand
Note that we're currently in hybrid mode and the on-prem version of Exchange is 2010, fully patched. We'll remove the hybrid configuration within a couple of weeks and be entirely online, but I don't want to wait until then to scan my mailboxes.
I'm still quite a novice when it comes to PowerShell. But note that I do have the AzureAD and ExchangeOnlineManagement PowerShell modules installed. Also note that I'm running this on the same machine where I have the Azure AD Connect tools installed and running.
What am I missing?
B Jon