Use these commands via SSH or remote management tools to fix a colleague's drive issues without taking over their screen.
If you are using PowerShell (the blue window), net use still works, but there is a native cmdlet that offers more readable output and object-based control.
By default, drives mapped via CMD might disappear when you reboot. To make sure the drive reconnects automatically at every login, add the /persistent switch: net use Z: \\TechServer\Marketing /persistent:yes Use code with caution. 2. The Modern Method: PowerShell map drive command line
Remove-PSDrive -Name "Z"
New-PSDrive -Name Z -PSProvider FileSystem -Root \\server\share -Persist Use these commands via SSH or remote management
List all current mappings:
net use [driveletter:] \\[servername\sharename] [options] To make sure the drive reconnects automatically at
If you don't care which letter is used (Z, Y, X, etc.), use the wildcard * . Windows will pick the last available letter starting from Z and working backward.
We will focus on the native Windows tool , which is the industry standard.