Network Drive ((link)) — Cmd Command To Map
(This will ask for confirmation unless you add /y at the end).
Last updated: March 2025. Compatible with Windows 10, Windows 11, Windows Server 2016/2019/2022. cmd command to map network drive
| Parameter | Function | | :--- | :--- | | * | Used in place of a password to prompt for input, or in place of a drive letter to use the next available letter. | | /user:[Domain\]User | Specifies the user context under which the connection is made. | | /savecred | Saves the credentials for the current session (often used instead of /user if credentials were saved previously via Windows UI). | | /persistent:yes | Controls the permanent storage of network connections. | | /delete | Removes a network connection. | (This will ask for confirmation unless you add
This command maps the network resource \\fileserver\sharedfolder to drive letter Z: using the specified username and password. | Parameter | Function | | :--- |
Before mapping a drive, ensure: