GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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 #5130

New issue
Copy link
New issue
Copy link
Closed
Closed
Cannot Connect to Office 365 with Powershell from non-Windows#5130
Copy link
Assignees
dantraMSFT
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-FixedThe issue is fixed.The issue is fixed.WG-RemotingPSRP issues with any transport layerPSRP issues with any transport layer
Milestone
6.1.0-Consider

Description

@andrew951
Andrew Shin (andrew951)
opened on Oct 16, 2017
Issue body actions

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 

Activity

Next
  1. Mark Kraus (markekraus)
    added
    WG-RemotingPSRP issues with any transport layerPSRP issues with any transport layer
    Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get a
    on Oct 16, 2017
  2. andrew951 commented on Oct 16, 2017

    @andrew951
    Andrew Shin (andrew951)
    on Oct 16, 2017
    Author
    More actions

    I tested on both Ubuntu and Mac OS X. This stopped working after Beta 6 was released. It is working in Beta 5.

  3. MaximoTrinidad commented on Oct 16, 2017

    @MaximoTrinidad
    Maximo Trinidad (MaximoTrinidad)
    on Oct 16, 2017
    More actions

    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>
    
  4. andrew951 commented on Oct 16, 2017

    @andrew951
    Andrew Shin (andrew951)
    on Oct 16, 2017
    Author
    More actions

    Maximo Trinidad (@MaximoTrinidad) my apologies. That was a typo. Issue still persists though. Your pwd is showing a C drive though?

  5. amdove commented on Oct 16, 2017

    @amdove
    Anna Williamson (amdove)
    on Oct 16, 2017
    More actions

    How about using the proxy method?
    -ConnectionURI https://outlook.office365.com/powershell-liveid/?proxymethod=rps`

  6. andrew951 commented on Oct 16, 2017

    @andrew951
    Andrew Shin (andrew951)
    on Oct 16, 2017
    Author
    More actions

    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

  7. Steve Lee (SteveL-MSFT)
    changed the title [-]Cannot Connect to Office 365 with Powershell[/-] [+]Cannot Connect to Office 365 with Powershell from non-Windows[/+] on Oct 16, 2017
  8. Steve Lee (SteveL-MSFT)
    added this to the This milestone has been deleted milestone on Oct 16, 2017
  9. MaximoTrinidad commented on Oct 16, 2017

    @MaximoTrinidad
    Maximo Trinidad (MaximoTrinidad)
    on Oct 16, 2017
    More actions

    Andrew Shin (@andrew951),

    My Bad!! I've been working in multiple environments. You 're right!
    Ubuntu 16.04.3 fail!

    Apologies!

  10. mepples21 commented on Oct 18, 2017

    @mepples21
    Michael Epping (mepples21)
    on Oct 18, 2017
    More actions

    Same issue here on macOS High Sierra:
    screenshot 2017-10-18 16 09 19

  11. SteveL-MSFT commented on Oct 18, 2017

    @SteveL-MSFT
    Steve Lee (SteveL-MSFT)
    on Oct 18, 2017
    Member
    More actions

    This is an issue with the non-Windows WSMan client

  12. SBiliarski commented on Oct 19, 2017

    @SBiliarski
    SBiliarski
    on Oct 19, 2017
    More actions

    Same here. Any workaround known?

    screenshot 2017-10-19 11 44 54

  13. andrew951 commented on Oct 20, 2017

    @andrew951
    Andrew Shin (andrew951)
    on Oct 20, 2017
    Author
    More actions

    SBiliarski if it's urgent, you can install PS Version 6 beta 6. It is working in that.

    Reacted by SBiliarski
  14. rolltide78 commented on Oct 25, 2017

    @rolltide78
    rolltide78
    on Oct 25, 2017
    More actions

    Same for me on high Sierra. What about a basic remoting session to a Windows server from macos? Is that possible?

  15. 7 remaining items

  16. Steve Lee (SteveL-MSFT)
    assigned
    Dan Travison (dantraMSFT)
    on Nov 8, 2017
  17. adaviel commented on Nov 8, 2017

    @adaviel
    Andrew Daviel (adaviel)
    on Nov 8, 2017
    More actions

    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

  18. SteveL-MSFT commented on Nov 8, 2017

    @SteveL-MSFT
    Steve Lee (SteveL-MSFT)
    on Nov 8, 2017
    Member
    More actions

    Dan Travison (@dantraMSFT) is actively working on an updated psrp client library update which hopefully resolves this issue

  19. vandot commented on Nov 11, 2017

    @vandot
    Иван Vandot (vandot)
    on Nov 11, 2017
    More actions

    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.

  20. Dongbo Wang (daxian-dbw)
    closed this as completedin #5469on Nov 15, 2017
  21. ssstonebraker commented on Aug 21, 2018

    @ssstonebraker
    Steve Stonebraker (ssstonebraker)
    on Aug 21, 2018
    More actions

    Installing PowerShell v6.0.4 on OSX 10.13.3 fixed the problem for me.

    Install Link:
    https://github.com/PowerShell/PowerShell/releases/download/v6.0.4/powershell-6.0.4-osx.10.12-x64.pkg

  22. Ilya (iSazonov)
    added
    Resolution-FixedThe issue is fixed.The issue is fixed.
    on Sep 5, 2018
  23. lexfrei commented on Jul 19, 2022

    @lexfrei
    Aleksei Sviridkin (lexfrei)
    on Jul 19, 2022
    More actions

    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
    
  24. robgroundhogday commented on Jul 25, 2022

    @robgroundhogday
    Robert Heine (robgroundhogday)
    on Jul 25, 2022
    More actions

    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
    
  25. robgroundhogday commented on Jul 25, 2022

    @robgroundhogday
    Robert Heine (robgroundhogday)
    on Jul 25, 2022
    More actions

    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
    
  26. JoeJePropeller commented on Aug 26, 2022

    @JoeJePropeller
    Joe Jennings (JoeJePropeller)
    on Aug 26, 2022
    More actions

    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
  27. phillippover commented on Nov 11, 2022

    @phillippover
    Phill Pover (phillippover)
    on Nov 11, 2022
    More actions

    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.0
  28. seabro commented on Dec 1, 2022

    @seabro
    Luke (seabro)
    on Dec 1, 2022
    More actions

    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
    
  29. daxian-dbw commented on Dec 1, 2022

    @daxian-dbw
    Dongbo Wang (daxian-dbw)
    on Dec 1, 2022
    Member
    More actions

    For those who run into this, the WSMan related support on non-Windows will be removed (see #17390), but you can install the PSWSMan module to get a better support of it.

    See https://github.com/jborean93/omi#open-management-infrastructure---powershell-edition for details of the PSWSMan module, especially the Installing section about how to use it.

    GitHub
    GitHub - jborean93/omi: Open Management Infrastructure
    Open Management Infrastructure. Contribute to jborean93/omi development by creating an account on GitHub.
    Reacted by Brian Scholer
  30. ezraroda commented on Jul 7, 2025

    @ezraroda
    ezraroda
    on Jul 7, 2025
    More actions

    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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dantraMSFT
    Dan Travison (dantraMSFT)

Labels

Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-FixedThe issue is fixed.The issue is fixed.WG-RemotingPSRP issues with any transport layerPSRP issues with any transport layer

Type

No type

Projects

No projects

    Milestone

    • 6.1.0-Consider

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402520 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.