GeezerVison is showing github.com — Cannot Connect to Office 365 with Powershell from non-Windows · Issue #5130 · PowerShell/PowerShell
Cannot Connect to Office 365 with Powershell from non-Windows #5130Description
Steps to reproduce
$credential = get-credential
New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri "https://outlook.office365.com/powershell-liveid/" -Credential $credential -Authentication "Basic" -AllowRedirection
Expected behavior
Actual behavior
New-PSSession : [outlook.office365.com] Connecting to remote server outlook.office365.com failed with the following error message : MI_RESULT_FAILED For more information, see
the about_Remote_Troubleshooting Help topic.
At line:1 char:12
+ $Session = New-PSSession -ConfigurationName Microsoft.Exchange -Conne ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotingTransportException
+ FullyQualifiedErrorId : 1,PSSessionOpenFailed
Environment data
> $PSVersionTable
Name Value
---- -----
PSVersion 6.0.0-beta.8
PSEdition Core
GitCommitId v6.0.0-beta.8
OS Linux 4.4.0-97-generic #120-Ubuntu SMP Tue Sep 19 17:28:18 UTC 2017
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0 Activityandrew951 commented on Oct 16, 2017 I tested on both Ubuntu and Mac OS X. This stopped working after Beta 6 was released. It is working in Beta 5. MaximoTrinidad commented on Oct 16, 2017 Andrew Shin (@andrew951),
FYI - Variable error $cred <> $credential.
Works in Ubuntu for me.
PowerShell v6.0.0-beta.8
Copyright (C) Microsoft Corporation. All rights reserved.
PS C:\Program Files\PowerShell\6.0.0-beta.8> $cred = get-credential
PowerShell credential request
Enter your credentials.
User: [email protected]
Password for user [email protected]: ************
PS C:\Program Files\PowerShell\6.0.0-beta.8> New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri "https:/
/outlook.office365.com/powershell-liveid/" -Credential $cred -Authentication "Basic" -AllowRedirection
Id Name ComputerName ComputerType State ConfigurationName Availability
-- ---- ------------ ------------ ----- ----------------- ------------
1 WinRM1 outlook.offi... RemoteMachine Opened Microsoft.Exchange Available
PS C:\Program Files\PowerShell\6.0.0-beta.8> $PSVersionTable
Name Value
---- -----
PSVersion 6.0.0-beta.8
PSEdition Core
GitCommitId v6.0.0-beta.8
OS Microsoft Windows 10.0.17017
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
PS C:\Program Files\PowerShell\6.0.0-beta.8>
andrew951 commented on Oct 16, 2017 amdove commented on Oct 16, 2017 andrew951 commented on Oct 16, 2017 Anna Williamson (@amdove)
PS /root> New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionURI "https://outlook.office365.com/powershell-liveid/?proxymethod=rps" -Credential $credential -Authentication "Basic" -AllowRedirection
New-PSSession : [outlook.office365.com] Connecting to remote server
outlook.office365.com failed with the following error message :
MI_RESULT_FAILED For more information, see the about_Remote_Troubleshooting
Help topic.
At line:1 char:1
+ New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri "h ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:Re
moteRunspace) [New-PSSession], PSRemotingTransportException
+ FullyQualifiedErrorId : 1,PSSessionOpenFailed
Tested on a fresh install of Ubuntu 16.04.3 LTS changed the title [-]Cannot Connect to Office 365 with Powershell[/-] [+]Cannot Connect to Office 365 with Powershell from non-Windows[/+] on Oct 16, 2017added this to the This milestone has been deleted milestone on Oct 16, 2017MaximoTrinidad commented on Oct 16, 2017 Andrew Shin (@andrew951),
My Bad!! I've been working in multiple environments. You 're right!
Ubuntu 16.04.3 fail!
Apologies! mepples21 commented on Oct 18, 2017 Same issue here on macOS High Sierra:
 SteveL-MSFT commented on Oct 18, 2017 This is an issue with the non-Windows WSMan client SBiliarski commented on Oct 19, 2017 Same here. Any workaround known?

andrew951 commented on Oct 20, 2017 SBiliarski if it's urgent, you can install PS Version 6 beta 6. It is working in that. rolltide78 commented on Oct 25, 2017 Same for me on high Sierra. What about a basic remoting session to a Windows server from macos? Is that possible? adaviel commented on Nov 8, 2017 I have the same issue in powershell-6.0.0_beta.9-1.rhel.7.x86_64 on CentOS 7.4
Works in beta 5.1, fails in 6.1, per now-closed dup issue 5372 SteveL-MSFT commented on Nov 8, 2017 vandot commented on Nov 11, 2017 I can also confirm that in also OSX 10.12.6 O365 remoting is broken in beta9 with MI_RESULT_FAILED, it works when downgrading to PS 6.0.0-beta.5. ssstonebraker commented on Aug 21, 2018 lexfrei commented on Jul 19, 2022 Have the same issue on 7.2.5
Any suggestions? Which additional info I should post here?
Name Value
---- -----
PSVersion 7.2.5
PSEdition Core
GitCommitId 7.2.5
OS Darwin 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:37 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T6000
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
robgroundhogday commented on Jul 25, 2022 Can confirm this from Ubuntu Server (Jammy)
Name Value
---- -----
PSVersion 7.2.5
PSEdition Core
GitCommitId 7.2.5
OS Linux 5.15.0-40-generic #43-Ubuntu SMP Wed Jun 15 12:54:21 UTC 2022
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
robgroundhogday commented on Jul 25, 2022 Just tried it with latest preview, similar results, $PSVersionTable:
Name Value
---- -----
PSVersion 7.3.0-preview.6
PSEdition Core
GitCommitId 7.3.0-preview.6
OS Linux 5.15.0-40-generic #43-Ubuntu SMP Wed Jun 15 12:54:21 UTC 2022
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
JoeJePropeller commented on Aug 26, 2022 Similar issue when trying to run the following:
Invoke-Command -ComputerName 10.0.0.4 -Credential domain\administrator -ScriptBlock {write-host 123} -authentication kerberos -usessl
I end up with the following returned:
OpenError: [10.0.0.4] Connecting to remote server 10.0.0.4 failed with the following error message : MI_RESULT_FAILED For more information, see the about_Remote_Troubleshooting Help topic.
$PSVersionTable:
Name Value
---- -----
PSVersion 7.2.6
PSEdition Core
GitCommitId 7.2.6
OS Linux 5.4.0-120-generic #136-Ubuntu SMP Fri Jun 10 13:40:48 UTC 2022
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
This is being ran from a Docker image. Dockerfile:
FROM mcr.microsoft.com/powershell:latest
RUN pwsh -Command 'Install-Module -Name PSWSMan -Force -Scope AllUsers'
RUN pwsh -Command 'Install-WSMan'
SHELL ["pwsh", "-Command"]
Reacted by Guillaume Dumont and DarkLite1 phillippover commented on Nov 11, 2022 Has there been any progress on this issue? Getting the same in latest preview. Tried Alpine, Debian and Ubuntu, all with the same error:
OpenError: [SERVER] Connecting to remote server SERVER failed with the following error message : MI_RESULT_FAILED For more information, see the about_Remote_Troubleshooting Help topic.
Name Value
---- -----
PSVersion 7.3.0-rc.1
PSEdition Core
GitCommitId 7.3.0-rc.1
OS Linux 5.10.102.1-microsoft-standard-WSL2 #1 SMP Wed Mar 2 00:30:59 UTC 2022
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0seabro commented on Dec 1, 2022 Same error. Trying on macos 12.6
Name Value
---- -----
PSVersion 7.3.0
PSEdition Core
GitCommitId 7.3.0
OS Darwin 21.6.0 Darwin Kernel Version 21.6.0: Mon Aug 22 20:17:10 PDT 2022; root:xnu-8020.140.49~2/RELEASE_X86_64
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
daxian-dbw commented on Dec 1, 2022 ezraroda commented on Jul 7, 2025 Same issue with MacOS connecting to Window11
MacOS:
PSVersion 7.5.2
PSEdition Core
GitCommitId 7.5.2
OS Darwin 24.5.0 Darwin Kernel Version 24.5.0: Tue Apr 22 19:53:27 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64…
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Windows 11:
PSVersion 7.5.2
PSEdition Core
GitCommitId 7.5.2
OS Microsoft Windows 10.0.26100
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Getting the following when running from MacOS:
Invoke-Command -ComputerName Windows11.lan -ScriptBlock {Write-Host "Calling from ${hostname}" } -ErrorAction Stop -Credential macuser
PowerShell credential request
Enter your credentials.
Password for user macuser: *******
OpenError: [Windows11.lan] Connecting to remote server Windows11.lan failed with the following error message : MI_RESULT_FAILED For more information, see the about_Remote_Troubleshooting Help topic.
This is after installing the following on the Mac:
pwsh -Command 'Install-Module -Name PSWSMan'
sudo pwsh -Command 'Install-WSMan'
Reacted by rdnaskelz, Robert Stettner and nomm
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|