Skip to content

New-Item does not list 'Target' parameter #10199

@gaiking-uk

Description

@gaiking-uk

Prerequisites

  • Existing Issue: Search the existing issues for this repository. If there is an issue that fits your needs do not file a new one. Subscribe, react, or comment on that issue instead.
  • Descriptive Title: Write the title for this issue as a short synopsis. If possible, provide context. For example, "Typo in Get-Foo cmdlet" instead of "Typo."
  • Verify Version: If there is a mismatch between documentation and the behavior on your system, ensure that the version you are using is the same as the documentation. Check this box if they match or the issue you are reporting is not version specific.

Links

https://learn.microsoft.com/en-gb/powershell/module/microsoft.powershell.management/new-item?view=powershell-7.3

Summary

A New-Item error message suggested that a parameter Target was required, however this does not exist according to the New-Item page.

Details

I got the below error when trying to create a junction with New-Item...

$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

Suggested Fix

If the error message is correct and a Target parameter is required, please can this listed as a parameter and an example usage included in the documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue-doc-bugIssue - error in documentationresolution-answeredStatus - closed by existing documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions