-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed as duplicate of#13136
Closed as duplicate of#13136
Copy link
Labels
Resolution-DuplicateThe issue is a duplicate.The issue is a duplicate.
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
As for latest 7.5.2, the following error happened:
> Test-Path -LiteralPath "a\a[b].txt"
# return True
> New-Item -ItemType SymbolicLink -Path "a[b].txt" -Target "a\a[b].txt"
# New-Item: Cannot find path 'a\a[b].txt' because it does not exist.
Expected behavior
PS> New-Item -ItemType SymbolicLink -Path "a[b].txt" -Target "a\a[b].txt"
Directory: E:\test
Mode LastWriteTime Length Name
---- ------------- ------ ----
la--- 7/10/2025 02:24 0 a[b].txt -> a\a[b].txtActual behavior
PS> New-Item -ItemType SymbolicLink -Path "a[b].txt" -Target "a\a[b].txt"
New-Item: Cannot find path 'a\a[b].txt' because it does not exist.Error details
Environment data
PS > $PSVersionTable
Name Value
---- -----
PSVersion 7.5.2
PSEdition Core
GitCommitId 7.5.2
OS Microsoft Windows 10.0.22631
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0Visuals
No response
Metadata
Metadata
Assignees
Labels
Resolution-DuplicateThe issue is a duplicate.The issue is a duplicate.