Title: Single Thread Apartment required for Enable-WSManCredSSP and Disable-WSManCredSSP · Issue #3353 · PowerShell/PowerShell · GitHub
Open Graph Title: Single Thread Apartment required for Enable-WSManCredSSP and Disable-WSManCredSSP · Issue #3353 · PowerShell/PowerShell
X Title: Single Thread Apartment required for Enable-WSManCredSSP and Disable-WSManCredSSP · Issue #3353 · PowerShell/PowerShell
Description: When given -Role Client, these cmdlets attempt to make use of the IGroupPolicyObject COM interface. IGroupPolicyObject requires that it be called from a Single Thread Apartment. STA is not supported in CoreCLR, so these cmdlets will fail...
Open Graph Description: When given -Role Client, these cmdlets attempt to make use of the IGroupPolicyObject COM interface. IGroupPolicyObject requires that it be called from a Single Thread Apartment. STA is not supporte...
X Description: When given -Role Client, these cmdlets attempt to make use of the IGroupPolicyObject COM interface. IGroupPolicyObject requires that it be called from a Single Thread Apartment. STA is not supporte...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/3353
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Single Thread Apartment required for Enable-WSManCredSSP and Disable-WSManCredSSP","articleBody":"When given `-Role Client`, these cmdlets attempt to make use of the `IGroupPolicyObject` COM interface. `IGroupPolicyObject` requires that it be called from a Single Thread Apartment. STA is not supported in CoreCLR, so these cmdlets will fail when using the Client role.\r\n\r\nThis is the underlying cause of issue #2599.\r\n\r\nThe core folk have an [existing issue](https://github.com/dotnet/corefx/issues/522) for support of STA.\r\n\r\nSteps to reproduce\r\n------------------\r\n`Enable-WSManCredSSP -DelegateComputer ServerA.foo.xyz.com -Role Client -Force`\r\nor\r\n`Disable-WSManCredSSP -Role Client`\r\n\r\nExpected behavior\r\n-----------------\r\nPerform the operation without error.\r\n\r\nActual behavior\r\n---------------\r\nThrows `System.InvalidCastException` when trying to cast an object to `IGroupPolicyObject`.\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\nPSRemotingProtocolVersion 2.3\r\nGitCommitId v6.0.0-alpha.16-49-g97be759cc7bd33abbe220dd87...\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}\r\nPSEdition Core\r\nCLRVersion\r\nPSVersion 6.0.0-alpha\r\nBuildVersion 3.0.0.0\r\nSerializationVersion 1.1.0.1\r\nWSManStackVersion 3.0\r\n```\r\n","author":{"url":"https://github.com/jeffbi","@type":"Person","name":"jeffbi"},"datePublished":"2017-03-17T06:08:44.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/3353/PowerShell/issues/3353"}
| 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:f0f7049f-8093-9640-bd05-0082750d0d2b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B264:E6048:930AC9:D641BB:6A578A7D |
| html-safe-nonce | 2a53a7d1601ad8d0ffb1398b9c18c10e339e508573d47f68637cdd1b9ef0beba |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMjY0OkU2MDQ4OjkzMEFDOTpENjQxQkI6NkE1NzhBN0QiLCJ2aXNpdG9yX2lkIjoiNjk4Nzk2Njk5MTI5NTgxMDE3MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 9c66f5e03a6b443f5cf0b1f708b988f254fd280eeb33287720d8fa85f1f42887 |
| hovercard-subject-tag | issue:214916293 |
| 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/3353/issue_layout |
| twitter:image | https://opengraph.githubassets.com/47e0d157975194fe7598fc3efcbae296741cd9bf61b4e648a2cc8abd319c98f3/PowerShell/PowerShell/issues/3353 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/47e0d157975194fe7598fc3efcbae296741cd9bf61b4e648a2cc8abd319c98f3/PowerShell/PowerShell/issues/3353 |
| og:image:alt | When given -Role Client, these cmdlets attempt to make use of the IGroupPolicyObject COM interface. IGroupPolicyObject requires that it be called from a Single Thread Apartment. STA is not supporte... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jeffbi |
| hostname | github.com |
| expected-hostname | github.com |
| None | c6353e56e94423c9cd5abde7708a859afa36a0c1203c73749055bf6ee6704cd0 |
| 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 | f59ab1c46b638204e2aea09126d089be5dc773b7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width