Skip to content

Path is not parsed correctly if '[' is present in the path #12168

@krishnayalavarthi

Description

@krishnayalavarthi

Steps to reproduce

$sess = New-PSSession -ComputerName localhost
Copy-Item -Path E:\test.txt -Destination 'e:\[test\' -ToSession $sess

Expected behavior

Should copy the file E:\test.txt to E:\[test directory

Actual behavior

Failed as '[' is seen as regex

Environment data

Applicable to all versions

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-FileSystem-Providerspecific to the FileSystem providerCommittee-ReviewedPS-Committee has reviewed this and made a decisionDocumentation Needed in this repoDocumentation is needed in this repoIssue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aKeepOpenThe bot will ignore these and not auto-closeUp-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Engine-Providersbuilt-in PowerShell providers such as FileSystem, Certificates, Registry, etc.

    Type

    No type

    Projects

    Status

    In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions