Title: Invoke-Command : Windows Principal functionality is not supported on this platform. · Issue #6435 · PowerShell/PowerShell · GitHub
Open Graph Title: Invoke-Command : Windows Principal functionality is not supported on this platform. · Issue #6435 · PowerShell/PowerShell
X Title: Invoke-Command : Windows Principal functionality is not supported on this platform. · Issue #6435 · PowerShell/PowerShell
Description: Sometimes, When I try to execute a remote command in a PowerShell Session from PowerShell in Linux, I get this error: Invoke-Command : Windows Principal functionality is not supported on this platform. From PowerShell in Mac works fine, ...
Open Graph Description: Sometimes, When I try to execute a remote command in a PowerShell Session from PowerShell in Linux, I get this error: Invoke-Command : Windows Principal functionality is not supported on this platf...
X Description: Sometimes, When I try to execute a remote command in a PowerShell Session from PowerShell in Linux, I get this error: Invoke-Command : Windows Principal functionality is not supported on this platf...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/6435
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Invoke-Command : Windows Principal functionality is not supported on this platform.","articleBody":"Sometimes, When I try to execute a remote command in a PowerShell Session from PowerShell in Linux, I get this error:\r\n\r\nInvoke-Command : Windows Principal functionality is not supported on this platform.\r\n\r\nFrom PowerShell in Mac works fine, but with PowerShell in Linux doesn't.\r\n\r\n\r\nSteps to reproduce\r\n------------------\r\nWe are connected to a Linux powershell session though a PowerShell session in a system with sshd Subsystem powershell /usr/bin/pwsh -sshs -NoLogo -NoProfile.\r\nOnce into the system, we want to execute a command to another Linux powershell session \r\n```\r\n$pss = New-PSSession -Hostname x.x.x.x -Username xxx -Port xx -KeyFilePath ~/.ssh/xxx\r\nInvoke-Command $pss { $PSVersionTable }\r\n```\r\n\r\nExpected behavior\r\n-----------------\r\n\r\n```\r\nName Value\r\n---- -----\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}\r\nPSRemotingProtocolVersion 2.3\r\nWSManStackVersion 3.0\r\nSerializationVersion 1.1.0.1\r\nPlatform Unix\r\nOS Linux 3.10.0-693.5.2.el7.x86_64 #1 SMP Fri Oct 20 20:32:50 UTC 2017\r\nPSVersion 6.0.1\r\nPSEdition Core\r\nGitCommitId v6.0.1\r\n\r\n```\r\n\r\nActual behavior\r\n---------------\r\n\r\n```\r\nInvoke-Command : Windows Principal functionality is not supported on this platform.\r\nAt line:1 char:1\r\n+ Invoke-Command $pss { $PSVersionTable }\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n+ CategoryInfo : NotSpecified: (:) [Invoke-Command], PlatformNotSupportedException\r\n+ FullyQualifiedErrorId : System.PlatformNotSupportedException,Microsoft.PowerShell.Commands.InvokeCommandCommand\r\n\r\n```\r\n\r\nEnvironment data\r\n----------------\r\n\r\n\u003c!-- provide the output of $PSVersionTable --\u003e\r\n\r\n```powershell\r\n\u003e $PSVersionTable\r\nName Value\r\n---- -----\r\nPSVersion 6.0.2\r\nPSEdition Core\r\nGitCommitId v6.0.2\r\nOS Linux 3.10.0-693.21.1.el7.x86_64 #1 SMP Wed Mar 7 19:03:37 UTC 2018\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\nBut if I execute Enter-PSSession I get an error, and then Invoke-Command runs like a charm.\r\n\u003cimg width=\"972\" alt=\"powershell linux issues\" src=\"https://user-images.githubusercontent.com/228097/37652234-28f1f9c2-2c3b-11e8-9f59-10f5c66e70e9.png\"\u003e\r\n\r\nIf we connect to the linux machine though ssh with bash, and execute */usr/bin/pwsh* Invoke-Command works at first attempt.","author":{"url":"https://github.com/corretge","@type":"Person","name":"corretge"},"datePublished":"2018-03-20T11:35:28.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":9},"url":"https://github.com/6435/PowerShell/issues/6435"}
| 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:fb517350-b181-4c6e-ea56-12c21046401f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C0F2:13EEA3:121F30C:19D7BE1:6A5A1CDF |
| html-safe-nonce | e260b27b0b518777d022f8d8da6898779a771a14218cf76ac4b41e10897c1bbf |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMEYyOjEzRUVBMzoxMjFGMzBDOjE5RDdCRTE6NkE1QTFDREYiLCJ2aXNpdG9yX2lkIjoiMjYwNjM0Mjg5NjQxMjMzNjMxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | dfd1de1573786245d92f148aaea77ca75d77e8d89cc858035bed0075a0e69ecd |
| hovercard-subject-tag | issue:306828409 |
| 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/6435/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3682e899459489eb2d9d9a9b98c2b43e1fcd6f16106dae3ec03c231c3a38a909/PowerShell/PowerShell/issues/6435 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3682e899459489eb2d9d9a9b98c2b43e1fcd6f16106dae3ec03c231c3a38a909/PowerShell/PowerShell/issues/6435 |
| og:image:alt | Sometimes, When I try to execute a remote command in a PowerShell Session from PowerShell in Linux, I get this error: Invoke-Command : Windows Principal functionality is not supported on this platf... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | corretge |
| hostname | github.com |
| expected-hostname | github.com |
| None | e31742e80bbd077fd5679c13ed870ce4e0c13803a2fa5beaae557b6769de2c8a |
| 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 | c9fcdbf98c619d1561ed843fa01d9766a32b5cd9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width