microsoft / CompliancePartnerWorkshops

Scripts and resources to support the Compliance Build-Intent engagements at https://aka.ms/mci/workshops
MIT License
20 stars 17 forks source link

Module not working with disabled WinRM Basic Authentication #10

Closed chwilfing closed 1 year ago

chwilfing commented 1 year ago

Hi,

customer of mine has disabled WinRM Basic Authentication on their clients via Group Policy, therefore trying to do a Connect-IPPSSession does not connect with error:

Connecting to Security & Compliance Center. Please logon in the new window
WARNING: Please note that you can only use above 9 new EXO cmdlets (the one with *-EXO* naming pattern).You can't use other cmdlets as we couldn't establish a Remote PowerShell session as bas
ic auth is disabled in your client machine. To enable Basic Auth, please check instruction here https://docs.microsoft.com/en-us/powershell/exchange/exchange-online-powershell-v2?view=exchang
e-ps#prerequisites-for-the-exo-v2-module
Create Powershell Session is failed using OAuth
At C:\Program Files\WindowsPowerShell\Modules\ExchangeOnlineManagement\3.1.0\netFramework\ExchangeOnlineManagement.psm1:733 char:21
+                     throw $_.Exception;
+                     ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [], Exception
    + FullyQualifiedErrorId : Create Powershell Session is failed using OAuth

Based on the current documentation (afaik) LearnWebSite - there is currently no way around this even with the V3 ExchangePowerShell Module.

Is there any way to run this compliance report without enabling basic authentication?

BG Christoph

chwilfing commented 1 year ago

Nevermind, we've solved the issue with the current Exchange PowerShell Module 3.2.0 - Preview4.

Upgrading to this version with:

Update-Module -Name ExchangeOnlineManagement -AllowPrerelease

or doing a plain install with:

Install-Module -Name ExchangeOnlineManagement -AllowPrerelease

and using (currently required as long as the module is not GA) the following command to connect:

Connect-IPPSSession -UseRPSSession:$false

Did the trick.

BG Christoph