Home Dashboard Directory Help
Search

Join-Path : Cannot find drive. A drive with the name 'E' does not exist. by blu-ray


Status: 

Active


2
0
Sign in
to vote
Type: Bug
ID: 781816
Opened: 3/20/2013 9:24:07 PM
Access Restriction: Public
0
Workaround(s)
view
1
User(s) can reproduce this bug

Description


insert USB drive,

[code]Get-PSDrive -psprovider filesystem |% {$_.root} |% { Join-Path $_ $_v1PathMarker }[/code]

perform as expected.

Eject USB drive. Then re-insert it,

[code]Get-PSDrive -psprovider filesystem |% {$_.root}[/code]

perform as expected. But,

[code]Get-PSDrive -psprovider filesystem |% {$_.root} |% { Join-Path $_ $_v1PathMarker }[/code]

gives this error:

"Join-Path : Cannot find drive. A drive with the name 'E' does not exist."

See also: http://social.technet.microsoft.com/Forums/en-US/winserverpowershell/thread/4ac53d11-40ed-4c40-aab3-451ad502667e
Details
Sign in to post a comment.
Posted by Michiel Wories - MSFT on 3/16/2014 at 1:56 PM
Seeing the same issue when I insert a USB stick, remove it, and reinsert it. It seems that the session caches the result. When I start a new shell the problem goes away.
Sign in to post a workaround.