-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New-Item -ItemType Junction- can't create functioning relative links #12785
Copy link
Copy link
Closed
Labels
Area-FileSystem-Providerspecific to the FileSystem providerspecific to the FileSystem providerIssue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or moreUp-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Cmdlets-Managementcmdlets in the Microsoft.PowerShell.Management modulecmdlets in the Microsoft.PowerShell.Management module
Metadata
Metadata
Assignees
Labels
Area-FileSystem-Providerspecific to the FileSystem providerspecific to the FileSystem providerIssue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or moreUp-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Cmdlets-Managementcmdlets in the Microsoft.PowerShell.Management modulecmdlets in the Microsoft.PowerShell.Management module
Steps to reproduce
Follow example 7 here: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/new-item?view=powershell-7powershell!
New-Item -ItemType Junction -Path .\link.txt -Target .\Notice.txt
New-Item -ItemType Junction -Path .\link -Target .\Notice -Force
Expected behavior
Create two functioning links for both a file and a folder
Actual behavior
PS C:\retus\test2Die\power problems> .\test.ps1
New-Item: C:\retus\test2Die\power problems\test.ps1:1
Line |
1 | New-Item -ItemType Junction -Path .\link.txt -Target .\Notice.txt
|
| Could not find item .\Notice.txt.
New-Item: C:\retus\test2Die\power problems\test.ps1:3
Line |
3 | New-Item -ItemType Junction -Path .\link -Target .\Notice -Force
|
| Could not find item .\Notice.
#NOTE
Works with absolute path
Environment data
PS C:\retus\test2Die\power problems> $psversiontable
Name Value
PSVersion 7.1.0-preview.3
PSEdition Core
GitCommitId 7.1.0-preview.3
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