The WinRM client cannot process the request

When trying to login to Office 365 with New-PSSession you might reiceve the following error:

New-PSSession : [admin1e.online.lync.com] Connecting to remote server admin1e.online.lync.com failed with the following error message : The WinRM client cannot process the request. Basic authentication is currently disabled in the client configuration. Change the
client configuration and try the request again.

So I created a small cmd snippet that resolves this (you need local administrator rights to do it):

reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\WinRM\Client /t REG_DWORD /v AllowBasic /d 1 /f
reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\WinRM\Service /t REG_DWORD /v AllowBasic /d 1 /f
winrm set winrm/config/service/auth @{Basic="true"}

Add a Comment

Your email address will not be published. Required fields are marked *