I'm having a problem running a Get-QuarantineMessage Powershell script for ExchangeOnline in Powershell. My manager is able to run it connecting to the exact same account and get results. When I run it, I just get brought back to the prompt without any output.
What could be the reason that my manager is able to run a script and get results, while I run it and get nothing? We are both successfully connecting to the same email address. I have confirmed that there are emails with the release status of requested. I'm able to run other Get-QuarantineMessage scripts and see results in the same session.
I'm running Powershell as an Admin and on VPN. I've tried uninstalling and reinstalling ExchangeOnline, disconnecting/reconnecting, and updating.
Thanks
#user notification area for modules
write-host -foreground yellow "Importing AD Module"
Import-Module ActiveDirectory
write-host -foreground yellow "Importing ExchangeOnlineManagement Module"
Import-Module -Name ExchangeOnlineManagement
#connection to exchange online here
write-host -foreground yellow "Connecting to ExchangeOnLine"
#$corpusername = $env:USERNAME
$corpusername = "email address"
write-host -foreground yellow "Logging in as $corpusername"
Connect-ExchangeOnline -UserPrincipalName $corpusername -ShowBanner:$false -ShowProgress $true
#get the quarantined messages with a release status of requested, ignore all others
$qmsgs= Get-QuarantineMessage -ReleaseStatus Requested