I'm trying to create a D: drive in Windows, which points to some local directory (e.g. C:\DDrive) using PowerShell.
This code runs fine:
New-PSDrive -Name D -Root "C:\D_Drive\" -PSProvider "FileSystem"
But in the Windows Explorer no D:-drive is visible.
How does one use that command correctly? Also: the drive should be permanent, so I tried adding a "-Persist" parameter. But that leads to an error ("unknown parameter "-Persist"...").
-persistoption and can be reflected to both logon sessions in a linked UAC logon (standard and elevated). For the C: drive, you can use the C$ administrative share, e.g. "\\localhost\C$\D_Drive".