Saturday, April 28, 2012

Mapped drives or shared drive commands

to map  a drive 

NET USE k:\test\book

NET USE M: /DELETE

NET USE M: "\\sharename" /PERSISTENT:NO


If a password is needed, the command will look like this:
NET USE M: "\\sharename" password /USER:domain\username /PERSISTENT:NO
The /PERSISTENT:NO at the end of the command tells Windows that it shouldn't try to reestablish the drive mapping at boot.