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

Status : 

 


3
0
Sign in
to vote
ID 781816 Comments
Status Active Workarounds
Type Bug Repros 1
Opened 3/20/2013 9:24:07 PM
Access Restriction Public

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
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.