Home Dashboard Directory Help
Search

Subst mapping not detected by Martin_Zugec


Status: 

Active


3
1
Sign in
to vote
Type: Bug
ID: 785098
Opened: 4/19/2013 1:02:17 AM
Access Restriction: Public
1
Workaround(s)
view
1
User(s) can reproduce this bug

Description

1.) We're creating local folder and use Subst to map it as H: drive (fake temporary home)

2.) Array of available PSDrives is NOT updated when subs is being used. That means that even though H:\ is mapped properly (I can see that outside of a Powershell) and it's detected properly when Powershell is restarted, it won't be dynamically added to list of available PSDrives for current session.
Details
Sign in to post a comment.
Sign in to post a workaround.
Posted by Martin_Zugec on 4/19/2013 at 1:06 AM
As a current workaround, I'm running New-PSDrive after Subst operation:
New-PSDrive -Name $DriveLetter -PSProvider FileSystem -Root "$($DriveLetter):\"

However, when this drive is removed (Subst $DriveLetter /d), it is NOT removed from list of PSDrives!