Originally Posted by Chrisn
rem @echo off
NET USE m: \\WIN2KSRV\sme /persistent:no
NET USE m: /DELETE
DIM WSHNetwork, SMLas
Set WSHNetwork = CreateObject("WScript.Network")
WshNetwork.RemovePrinterConnection SMLas, true, true
Completely uncommented because I'm lazy and didn't see the point on such a short script. Apparently there are ways to remove a printer in a bat script but calling a vbs works just as well.