Search notes:

net use

Mapping a network drive

net use can be used to map a drive:
net use f: \\SERVERNAME\Foo
Additionally specify the user account with which to connect:
net use f: \\SERVERNAME\\Foo /user:domain\user.name
The user's password can be appended after the logon name:
net use f: \\SERVERNAME\\Foo /user:domain\user.name mySecret
After mapping a network drive, the mapped drive names seem to appear in the registry as subkeys under HKEY_CURRENT_USER\Network.
The mapped drives can also be queried with wmic.exe:
c:\> wmic logicalDisk where driveType=4 get providerName, deviceId, description

Unmapping (deleting) a drive

net use f: /delete

See also

The PowerShell cmdlet new-psDrive and cmdlet noun smbMapping
net1.exe

Index