She hit Enter. The cursor dropped to a new line, asking for the password. Miller didn't hesitate; she typed the sixteen-character string from memory.
subst <drive_letter>: \\<server_name>\<share_name>
"Done," Miller said, standing up. "Now, navigate to Z: and grab the logs. I’ll hold the door."
Mapping a network drive from the command line is a useful skill for system administrators and power users. The net use , pushd , and subst commands can be used to map a network drive, and various options and switches can be used to customize the mapping process. By understanding how to map a network drive from the command line, you can automate tasks, access network drives remotely, and use command line tools more effectively.
This command maps the z: drive to the \\server1\share network drive and sets it to persist across reboots.
But the victory was short-lived. The lights flickered violently.
Example: