Z: drive: NinjaOne +1 cmd net use Z: \Server1\Backups /persistent:yes Use code with caution. Copied to clipboard B. Map a Drive with Different Credentials If the share requires a username and password different from your current Windows session: Webhosting UK cmd net use Z: \Server1\Backups /user:Domain\Username Password /persistent:yes Use code with caution. Copied to clipboard C. Map a Drive and Disconnect Immediately (No Persistence) To map a drive temporarily, use
if exist Z: ( echo Drive Z already exists. Disconnecting... net use Z: /delete ) net use Z: \\ServerName\ShareName command line map network drive
:By default, these mappings may disappear after a reboot. Use the /persistent:yes flag to ensure they reconnect at sign-in: net use S: \\FileServer\Sales /persistent:yes Z: drive: NinjaOne +1 cmd net use Z: