In PowerShell, is it possible to map a drive letter to a local path ?
So for example map x:\
to c:\myfolder1\myfolder2\
You could use subst
:
subst x: c:\myfolder1\myfolder2\
or New-PSDrive
:
New-PSDrive -Name x -PSProvider FileSystem -Root c:\myfolder1\myfolder2\
The following statement will also work (and it only uses native powershell cmdlets):
New-PsDrive -Name [DRIVELETTER] -PSProvider filesystem -Root "\\localhost\C$\[PATH]" -Persist
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With