Skip to content

new-item junction could not find item{0} #10214

@msftrncs

Description

@msftrncs

This bug report is regarding an error message that doesn't help. It seems that a format operation failed. Minor detail .. I am working on a UNC path. Evidently I need a complete path to the junction point, as a relative one doesn't seem to be acceptable. None the less the issue here is that the formatting of the error response is missing the path and instead shows {0}

new-item -type Junction -name 'HRETS INSERVICE' -target '.\0001 HRETS INSERVICE'
new-item : Could not find item {0}.
At line:1 char:1
+ new-item -type Junction -name 'HRETS INSERVICE' -target '.\0001 HRETS ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : ObjectNotFound: (.\0001 HRETS INSERVICE:String) [New-Item], InvalidOperationException
+ FullyQualifiedErrorId : ItemNotFound,Microsoft.PowerShell.Commands.NewItemCommand

Environment data

Name                           Value
----                           -----
PSVersion                      7.0.0-preview.2
PSEdition                      Core
GitCommitId                    7.0.0-preview.2
OS                             Microsoft Windows 10.0.18362
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugIssue has been identified as a bug in the productWG-Engine-Providersbuilt-in PowerShell providers such as FileSystem, Certificates, Registry, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions