Home Dashboard Directory Help
Search

Join-Path with -Resolve option return PSProvider qualified path when network share specified by Altrive


Status: 

Active


1
0
Sign in
to vote
Type: Bug
ID: 801942
Opened: 9/23/2013 5:26:37 AM
Access Restriction: Public
0
Workaround(s)
view
1
User(s) can reproduce this bug

Description

Join-Path with -Resolve option return PSProvider qualified path when network share specified.

PS>Join-Path "\\127.0.0.1" "Users" -Resolve
Microsoft.PowerShell.Core\FileSystem::\\127.0.0.1\Users

It is not a problem in PS context. but when result is passed to native command or .NET API. it cause problems.
So it need to resolve by following command when parameter can be network path.
PS> (Resolve-Path $path).ProviderPath

Is it possible to change this behavior? or any reason Join-Path return PSProvider qualified path?
Details
Sign in to post a comment.
Posted by guitarrapc on 9/23/2013 at 6:12 AM
It also reproduced with PowerShell V4.0 with Windows 8.1 RTM.
Sign in to post a workaround.