Delete network drive from command line

We can delete mapped drive command line using ‘net use’ command. For example to disconnect the network share mapped to the drive z: we can run the below command.

net use /del Z:

Similarly to delete all the mapped drives we can run the below command.

net use /del *