Title: Can not connect to Office 365 / Exchange Online with PowerShell · Issue #5561 · PowerShell/PowerShell · GitHub
Open Graph Title: Can not connect to Office 365 / Exchange Online with PowerShell · Issue #5561 · PowerShell/PowerShell
X Title: Can not connect to Office 365 / Exchange Online with PowerShell · Issue #5561 · PowerShell/PowerShell
Description: I can not connect to Office 365 / Exchange Online with PowerShell. Apparently others can with the latest version of push, but it is not working for me on either macOS 10.12 or 10.13 with pwsh 6.0.0-rc I get an error creating the New-PSSe...
Open Graph Description: I can not connect to Office 365 / Exchange Online with PowerShell. Apparently others can with the latest version of push, but it is not working for me on either macOS 10.12 or 10.13 with pwsh 6.0.0...
X Description: I can not connect to Office 365 / Exchange Online with PowerShell. Apparently others can with the latest version of push, but it is not working for me on either macOS 10.12 or 10.13 with pwsh 6.0.0...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/5561
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Can not connect to Office 365 / Exchange Online with PowerShell","articleBody":"I can not connect to Office 365 / Exchange Online with PowerShell.\r\nApparently others can with the latest version of push, but it is not working for me on either macOS 10.12 or 10.13 with pwsh 6.0.0-rc\r\n\r\nI get an error creating the New-PSSession. Depending on the exact syntax of the command I'm using, it either says New-PSSession : This parameter set requires WSMan, and no support WSMan client library was found, or PowerShell quits with an unhandled exception and abort trap 6.\r\n\r\nSteps to reproduce\r\n------------------\r\n\r\nInstall PowerShell 6.0.0-rc on macOS 10.12 or 10.13.\r\nUse Get-Credential to get an Office 365 administrator credential and then use New-PSSession to create a new session.\r\n\r\n```powershell\r\n[kai@blackmac ~]$ pwsh\r\nPowerShell v6.0.0-rc\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\n\r\nhttps://aka.ms/pscore6-docs\r\nType 'help' to get help.\r\n\r\nPS /Users/kai> $PSVersionTable \r\n\r\nName Value \r\n---- ----- \r\nPSVersion 6.0.0-rc \r\nPSEdition Core \r\nGitCommitId v6.0.0-rc \r\nOS Darwin 16.7.0 Darwin Kernel Version 16.7.0: T...\r\nPlatform Unix \r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} \r\nPSRemotingProtocolVersion 2.3 \r\nSerializationVersion 1.1.0.1 \r\nWSManStackVersion 3.0 \r\n\r\n\r\nPS /Users/kai> $UserCredential = Get-Credential \r\n\r\nPowerShell credential request\r\nEnter your credentials.\r\nUser: admin@example.com\r\nPassword for user admin@example.com: ***********\r\n\r\nPS /usr/local/microsoft> $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection \r\nNew-PSSession : This parameter set requires WSMan, and no supported WSMan client library was found. WSMan is either not installed or unavailable for this system.\r\nAt line:1 char:12\r\n+ $Session = New-PSSession -ConfigurationName Microsoft.Exchange -Conne ...\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n+ CategoryInfo : ResourceUnavailable: (:) [New-PSSession], PSRemotingTransportException\r\n+ FullyQualifiedErrorId : System.Management.Automation.Remoting.PSRemotingDataStructureException,Microsoft.PowerShell.Commands.NewPSSessionCommand\r\n \r\nPS /Users/kai> $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid -Credential $UserCredential -Authentication Basic -AllowRedirection \r\n\r\nAn error has occurred that was not properly handled. Additional information is shown below. The PowerShell process will exit.\r\n\r\nUnhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.\r\n at System.Management.Automation.Remoting.PrioritySendDataCollection.Clear()\r\n at System.Management.Automation.Remoting.Client.BaseClientTransportManager.CloseAsync()\r\n at System.Management.Automation.Remoting.Client.WSManClientSessionTransportManager.CloseAsync()\r\n at System.Management.Automation.Remoting.Client.BaseClientTransportManager.Finalize()\r\nAbort trap: 6\r\n[kai@blackmac ~]$ \r\n```\r\nYou will note from the prompt in the last line above that it's dropped me back into the bash shell.\r\n\r\nExpected behavior\r\n-----------------\r\n\r\nIt is expected that New-PSSession will work on macOS\r\n\r\nActual behavior\r\n---------------\r\n\r\nDepending on the precise syntax of the command, New-PSSession either returns an error message:\r\nNew-PSSession : This parameter set requires WSMan, and no supported WSMan client library was found\r\nOr, New-PSSession has an unhandled exception and PowerShell quits with abort trap 6.\r\n\r\nThe differences in the syntax are with the ConnectionUri - whether or not there is a trailing slash on the uri seems to make the difference. With a trailing slash, I get the error about WSMan missing. Without the trailing slash, the PowerShell session aborts.\r\n\r\nWith trailing slash:\r\n```powershell\r\nPS /Users/kai> $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection \r\nNew-PSSession : This parameter set requires WSMan, and no supported WSMan client library was found. WSMan is either not installed or unavailable for this system.\r\nAt line:1 char:12\r\n+ $Session = New-PSSession -ConfigurationName Microsoft.Exchange -Conne ...\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n+ CategoryInfo : ResourceUnavailable: (:) [New-PSSession], PSRemotingTransportException\r\n+ FullyQualifiedErrorId : System.Management.Automation.Remoting.PSRemotingDataStructureException,Microsoft.PowerShell.Commands.NewPSSessionCommand\r\n```\r\nWithout trailing slash:\r\n```powershell\r\nPS /Users/kai> $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid -Credential $UserCredential -Authentication Basic -AllowRedirection \r\n\r\nAn error has occurred that was not properly handled. Additional information is shown below. The PowerShell process will exit.\r\n\r\nUnhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.\r\n at System.Management.Automation.Remoting.PrioritySendDataCollection.Clear()\r\n at System.Management.Automation.Remoting.Client.BaseClientTransportManager.CloseAsync()\r\n at System.Management.Automation.Remoting.Client.WSManClientSessionTransportManager.CloseAsync()\r\n at System.Management.Automation.Remoting.Client.BaseClientTransportManager.Finalize()\r\nAbort trap: 6\r\n```\r\n\r\nEnvironment data\r\n----------------\r\n\r\n```powershell\r\nPS /Users/kai> $PSVersionTable Name Value \r\n---- ----- \r\nPSVersion 6.0.0-rc \r\nPSEdition Core \r\nGitCommitId v6.0.0-rc \r\nOS Darwin 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT ...\r\nPlatform Unix \r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} \r\nPSRemotingProtocolVersion 2.3 \r\nSerializationVersion 1.1.0.1 \r\nWSManStackVersion 3.0 \r\n```\r\n","author":{"url":"https://github.com/kai-h","@type":"Person","name":"kai-h"},"datePublished":"2017-11-28T09:20:03Z","url":"https://github.com/PowerShell/PowerShell/issues/5561"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:730ee0e3-f232-89cf-b2e5-410447f2e1e4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A27C:F27CE:2726001:367D165:6AFD47FC |
| html-safe-nonce | 562462ed01cda597dadae6ae5a83816c341efddebc26491fa350d5b3c811124c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMjdDOkYyN0NFOjI3MjYwMDE6MzY3RDE2NTo2QUZENDdGQyIsInZpc2l0b3JfaWQiOiI1OTI1NTEyMjcyNjQxMDgzMzg5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | eac9b88b7aa4acd7af64ae316a5f3140428a85acb308f88bdbfec95b2ee53c6c |
| hovercard-subject-tag | issue:277310522 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/5561/issue_layout |
| twitter:image | https://opengraph.githubassets.com/adc2e36dbe3b1b655ec4eb4b565e7953258929d7686153a796183b7d92647d52/PowerShell/PowerShell/issues/5561 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/adc2e36dbe3b1b655ec4eb4b565e7953258929d7686153a796183b7d92647d52/PowerShell/PowerShell/issues/5561 |
| og:image:alt | I can not connect to Office 365 / Exchange Online with PowerShell. Apparently others can with the latest version of push, but it is not working for me on either macOS 10.12 or 10.13 with pwsh 6.0.0... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kai-h |
| hostname | github.com |
| expected-hostname | github.com |
| None | bdbacc25b921224ff0befcb9e629560a1255be51aec9991d6e3f95b5e9151474 |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 556dd37bb0aceffb25724e151b5d858b3265b40b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width