kind of a weird question but how do I make a drive go from a OK state to disconnected state using net use? I do not want to delete it.
I am testing a script but the annoying thing is that to test the item I want I require a disconnected drive. I can't find anything anywhere as to how to do this.
If I do this:
net use X: /delete
=> then this deletes the drive.
I want the status of a drive to be "Disconnected"
Any ideas?
EDIT: I have taken the network offline and that disconnected a drive (i.e. the drive is now in a disconnected state)....not an ideal solution so if anyone has an idea where the network can remain online and I can make a drive "disconnected" that would be great!
One possible workaround that comes to mind is to use pause between connecting and disconnecting the drive.
The downside is that you will need to press a button on the screen that is running the script when you want the script to continue.
You can restart the "Workstation" service, on the client computer.
Add server name with bogus IP address to hosts file. That should do the trick.