Emnico in Swindon and its partners
in the UK and Europe provide:

» IT Support Services and Products
» Bespoke Software Development


Contact our Swindon office on:
+44 (0)1793 614 700
to discuss your IT needs.


CLOSE IT
Emnico Logo
Your Virtual Technology Team
Delivering Peak Performance
Category: Type: Order:
Search For:  
Home > Library > Delete Shared Printers

Delete Shared Printers

This script will remove all network printers starting with \\
Added 285 days ago by Emnico
Download
Review
Back
44Views
This script has been successfully tested by Emnico and is verified to be working.

Source code

Set WshNetwork = WScript.CreateObject("WScript.Network")
Set Printers = WshNetwork.EnumPrinterConnections
For i = 0 to Printers.Count - 1 Step 2
    If Left(ucase(Printers.Item(i+1)),2) = "\\" Then
        WSHNetwork.RemovePrinterConnection Printers.Item(i+1)
    End IF
Next


| Privacy policy | Environmental policy | Site map |