r/PowerShell • u/sundry_outlook • Apr 21 '26
PSDrive
Hi..
I have created a new PSDrive having name `S:`.
new-psdrive -name S -psprovider filesystem -root c:\users\username\dir
one running command `get-content` works fine, but `vim` is opening a blank file.
get-content S:\test.txt # works fine
vim S:\test.txt # opens a blank file
8
Upvotes
View all comments
Show parent comment
1
u/Over_Dingo Apr 21 '26
ok it doesn't really change it. But you can open a file in that location if you cd to it, then vim .\file (then it translates the path to the root of psdrive).
The option that is supposed to make it be visible from outside of shell is
-Persist,but it only works for remote locations: