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

PSGetMember binder generates a loose restriction rule that cause ETS member access to fail after a COM member access #4607

Copy link
Copy link
@daxian-dbw

Description

@daxian-dbw
Issue body actions

Steps to reproduce

Assume there is at least one file in the folder F:\tmp

$shell = New-Object -ComObject "Shell.Application"
$folder = $shell.Namespace("F:\tmp")
$item = $folder.Items().Item(0)
$item | % { $_.Name }

$s = Add-Member -InputObject "abc" -MemberType NoteProperty -Name Name -Value "Hello" -PassThru
$s.Name

Expected behavior

PS:2> $s.Name
Hello

Actual behavior

Return nothing

Environment data

> $PSVersionTable
Name                           Value
----                           -----
PSVersion                      6.0.0-beta
PSEdition                      Core
GitCommitId                    v6.0.0-beta.3-30-gece27ff68798f508c755ccb84be5ae78b386ac82
OS                             Microsoft Windows 10.0.15063
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

Resolution-FixedThe issue is fixed.The issue is fixed.WG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No 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.