Skip to content

provider path in namespace variable notation inconsistency #9634

@msftrncs

Description

@msftrncs

Steps to reproduce

Try a provider path in namespace variable notation to access a file:

${filesystem::drive:pathtofile} # nothing happens
${filesystem::drive:pathtofile} = 'hello' # 'hello' is written to file
${filesystem::drive:pathtofile} # nothing happens
${drive:pathtofile} # gets file contents 'hello'

Substitute a valid accessible path to a temporary file for testing. Note that using a drive requires Windows drives.

I'd expect both syntaxes to read the file, since the provider notation is able to write the file.

Environment data

Name                           Value
----                           -----
PSVersion                      6.2.0
PSEdition                      Core
GitCommitId                    6.2.0
OS                             Microsoft Windows 10.0.17763
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugIssue has been identified as a bug in the productResolution-No ActivityIssue has had no activity for 6 months or moreWG-Engine-Providersbuilt-in PowerShell providers such as FileSystem, Certificates, Registry, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions