net use command, it may be possible to delete the specified mapped drive command line. For example, we can run the following command to disconnect the share shown below that has been mapped towards the drive
Net use delete all –
net use /del Z:
The command below can be used to get rid of all the mapped drives.
net use /del *
You may also like: Change Directory in CMD Windows 10