Reference : http://superuser.com , https://network.kku.ac.thindex.php

NET USE
[devicename | *] [\computername\sharename[\volume] [password | *]]
[/USER:[domainname]username]
[/USER:[dotted domain name]username]
[/USER:[username@dotted domain name]
[/SMARTCARD]
[/SAVECRED]
[[/DELETE] | [/PERSISTENT:{YES | NO}]]

NET USE {devicename | *} [password | *] /HOME

NET USE [/PERSISTENT:{YES | NO}]


Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.

C:\Users\KITMANA>net use
New connections will be remembered.
Status Local Remote Network


Unavailable P: \192.168.199.1\pariwat Microsoft Windows Network
Disconnected \192.168.199.1\IPC$ Microsoft Windows Network
The command completed successfully.

net use \192.168.199.1\pariwat /delete
net use \192.168.199.1\IPC$ /delete
C:\Users\KITMANA>net use * /delete
You have these remote connections:

P: \192.168.199.1\pariwat
\192.168.199.1\IPC$
Continuing will cancel the connections.

Do you want to continue this operation? (Y/N) [N]: y
The command completed successfully.
C:\Users\KITMANA>net use
New connections will be remembered.

There are no entries in the list.

CMD Script “netuse.bat”

@echo off
::Disconnect user
net use * /delete /y
msg * /time:5 “You have been successfully Disconnected”

Map Network Drive Auto-Script

C:\Users\net use P: \10.19.51.60\pariwat /USER:pariwat pxxx@XXXX