net use
Mapping a network drive allows you to assign a local drive letter (like Z:)
to a shared folder on another computer or server on your network.
This enables easy access to shared resources such as project files,
analysis reports, or configuration data.
net use Z: \\Dept_BusinessLine\shared_docs
net use — The Windows command to connect, remove, or list shared drives or printers.Z: — The local drive letter you want to assign to the shared resource.\\Dept_BusinessLine\shared_docs — The UNC (Universal Naming Convention) path of the shared folder.When you run the command:
net use Z: \\Dept_BusinessLine\shared_docs
This happens:
Dept_BusinessLine over the SMB protocol (usually port 445).shared_docs is shared and accessible.Z: on your machine.Z:\ in CMD/PowerShell.If the share requires credentials, you can specify them:
net use Z: \\Dept_BusinessLine\shared_docs /user:DOMAIN\username yourpassword
To automatically reconnect this drive after restart:
net use Z: \\Dept_BusinessLine\shared_docs /persistent:yes
To remove it:
net use Z: /delete
Here are some sample mappings you can try in a lab or demo environment:
net use Z: \\testserver\shared_docs net use Y: \\fileserver\project_data net use X: \\demo_machine\reports /user:DEMO\labuser labpass123 net use Q: \\192.168.1.50\public /persistent:yes
Z: → Maps to shared_docs on testserver.Y: → Maps to project_data on fileserver.X: → Uses credentials to connect to reports on demo_machine.Q: → Connects to a public share on a local IP and makes it persistent.For questions or automation ideas, feel free to reach out.