Cannot Connect to Office 365 with Powershell from non-Windows
See original GitHub issueSteps 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
Issue Analytics
- State:
- Created 6 years ago
- Comments:29 (5 by maintainers)
Top Results From Across the Web
Access is denied when you connect to Exchange Online ...
Solution · Sign in to the Microsoft 365 portal (https://portal.office.com) as an administrator. · Click Admin, and then click Exchange. · Click ...
Read more >Connect to Microsoft 365 with PowerShell
Connect to your Microsoft 365 tenant by using PowerShell for Microsoft 365 to do admin center tasks from the command line.
Read more >Can not connect to Office 365 / Exchange Online with ...
Install PowerShell 6.0.0-rc on macOS 10.12 or 10.13. Use Get-Credential to get an Office 365 administrator credential and then use New-PSSession ...
Read more >Connect to Office 365 with PowerShell Core from non-Windows
I was asked: “Do you use the native macOS PowerShell to connect to Office 365”. The short answer is: “Not really”!
Read more >Error Connecting To Exchange Online Powershell
Solved. Microsoft Office 365 Microsoft Exchange. I recently installed an update to the MIcrosoft Exchange ONline POwershell module.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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
:This is being ran from a Docker image.
Dockerfile
:@SBiliarski if it’s urgent, you can install PS Version 6 beta 6. It is working in that.