When in a script or interactive use and you have defined a PSDrive as a shortlink to another location on the same disk Resolve-Path returns the PSDrive relative file path whereas I think that it should be able to return the actual full file path instead similarly to how Get-Item returns the non-relative PSDrive path and shows this correctly under the PSPath & Fullname properties
Steps to reproduce
Create new PSDrive to C:\temp folder - New-PSDrive -Name CT -Root C:\temp -Provider FileSystem
Create file test.txt in C:\temp folder - New-Item C:\temp\test.txt
cd to the PSDrive -Set-location CT:\
Run Resolve-Path test.txt
Expected behavior
Resolve-Path returns the full path to the file so output should be C:\temp\test.txt
Actual behavior
Resolve-Path returns the PSDrive relative path so it returns CT:\test.txt
Environment data
Name Value
---- -----
PSVersion 5.1.14393.187
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14393.187
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
When in a script or interactive use and you have defined a PSDrive as a shortlink to another location on the same disk Resolve-Path returns the PSDrive relative file path whereas I think that it should be able to return the actual full file path instead similarly to how Get-Item returns the non-relative PSDrive path and shows this correctly under the PSPath & Fullname properties
Steps to reproduce
Create new PSDrive to C:\temp folder -
New-PSDrive -Name CT -Root C:\temp -Provider FileSystemCreate file test.txt in C:\temp folder -
New-Item C:\temp\test.txtcd to the PSDrive -
Set-location CT:\Run
Resolve-Path test.txtExpected behavior
Resolve-Path returns the full path to the file so output should be
C:\temp\test.txtActual behavior
Resolve-Path returns the PSDrive relative path so it returns
CT:\test.txtEnvironment data