I created a .ps1
script to mount a folder to the Drive S
.
This works fine. When I reassign an other folder it still works but the name in the explorer wont be updated. But the correct folder is assign. (checked this by the available files after reassign).
I did this with the following script and just changed the path when i reassign an other folder:
subst s: /D
subst s: X:\folder1
So when I run the script for the first time to assign TestFolder1
in the explorer this will be shown:
And when I run then the script again but to assign TestFolder2
the TestFolder2
will be assign to S:
but the explorer will still show TestFolder1
(just like in the screenshot)
Is there a way to update the name in explorer within the script? Or is this a settings issue?
New-PSDrive
/Remove-PSDrive
/Get-PSDrive
. Do they behave the same?