You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
New-Item cannot create symlink/hardlink for file with name containing bracket #25744
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.0
However, it seems that the PR fixed hasn't landed yet: it wasn't slated for back-porting to v7.5.x, and the current v7.6.x preview (v7.6.0-preview.4) release predates the PR.
In other words: the fix should land in the next preview version, presumably named v7.6.0-preview.5
Reacted by Mr Beedell, Roke Julian Lockhart and Patrick Meinecke
Activity
similar-issues-ai commentedon Jul 9, 2025
We've found some similar issues:
new-itemcannot create hardlinks with[]in the name on win10 #14960 , similarity score: 85%If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.
mklement0 commentedon Jul 9, 2025
The best duplicate is:
The following PR fixed the problem:
However, it seems that the PR fixed hasn't landed yet: it wasn't slated for back-porting to v7.5.x, and the current v7.6.x preview (v7.6.0-preview.4) release predates the PR.
In other words: the fix should land in the next preview version, presumably named v7.6.0-preview.5
microsoft-github-policy-service commentedon Jul 15, 2025
📣 Hey @wumo (@wumo), how did we do? We would love to hear your feedback with the link below! 🗣️
🔗 https://aka.ms/PSRepoFeedback