-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
Resolution-FixedThe issue is fixed.The issue is fixed.
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
New-Item parameter set / parameter checking gives an incorrect error message when trying to create a junction... It specifies that a Target parameter is needed, however there is no parameter called Target.
I raised this initially as a documentation issue #10199, but @sdwheeler advised that this is a bug as there is no parameter called Target, and actually Target is an alias for Value
Expected behavior
$JuncName = "Foo"
$JuncTarget = "D:\Junction_Target"
> New-Item -ItemType Junction -Name $JuncName -Path $JuncTarget
Junction created successfully.Actual behavior
$JuncName = "Foo"
$JuncTarget = "D:\Junction_Target"
> New-Item -ItemType Junction -Name $JuncName -Path $JuncTarget
ERROR: Link "D:\Junction_Target" cannot be created because Target was not specified.Error details
Link cannot be created because Target was not specified.Environment data
> $PSVersionTable
Name Value
GitCommitId 7.3.4
OS Microsoft Windows 10.0.22621
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-FixedThe issue is fixed.The issue is fixed.