Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Single Thread Apartment required for Enable-WSManCredSSP and Disable-WSManCredSSP #3353

Copy link
Copy link
@jeffbi

Description

@jeffbi
Issue body actions

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.

This is the underlying cause of issue #2599.

The core folk have an existing issue for support of STA.

Steps to reproduce

Enable-WSManCredSSP -DelegateComputer ServerA.foo.xyz.com -Role Client -Force
or
Disable-WSManCredSSP -Role Client

Expected behavior

Perform the operation without error.

Actual behavior

Throws System.InvalidCastException when trying to cast an object to IGroupPolicyObject.

Environment data

> $PSVersionTable
Name                           Value
----                           -----
PSRemotingProtocolVersion      2.3
GitCommitId                    v6.0.0-alpha.16-49-g97be759cc7bd33abbe220dd87...
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSEdition                      Core
CLRVersion
PSVersion                      6.0.0-alpha
BuildVersion                   3.0.0.0
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
Reactions are currently unavailable

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.