To disconnect and return to the original drive:
NET USE Z: /DELETE Delete all mappings at once: map drive command line
PUSHD \\fileserver01\Marketing This automatically creates a temporary mapping, switches to it, and stores the previous location on a stack. To disconnect and return to the original drive:
Next time you reach for your mouse, pause. Open a command prompt and type NET USE . You might never go back. First published on [Your Publication Name]. Have a tip or a tricky mapping scenario? Share it in the comments. You might never go back
NET USE Z: \\fileserver01\Marketing /SAVECRED This stores credentials in Windows Credential Manager, allowing seamless reconnection later. List all current mappings:
NET USE Z: \\fileserver01\Marketing This maps the Marketing share to the Z: drive. If the share requires authentication, you'll be prompted for credentials. Map with explicit credentials:
NET USE Z: \\fileserver01\Marketing /USER:DOMAIN\jsmith P@ssw0rd Security note: Embedding passwords in plaintext is convenient for scripts but a security risk. Use * instead of the password to trigger a secure prompt.