I'm looking for a reliable script to delete all network printers when a user logs off. Our users have roaming profiles and are currently picking up printers from every room they log into.
We are running Server 2008 r2/Win7 and printers are being deployed by Print Management.
Any help would be greatly appreciated.
We use vbscript to remove printers on logon, not sure if you could integrate the code with a shutdown script:
Set wshNetwork = CreateObject("WScript.Network")
on Error Resume Next
'Deletes all network printers
Set clPrinters = WshNetwork.EnumPrinterConnections
On Error Resume Next
For i = 0 to clPrinters.Count - 1 Step 2
wshNetwork.RemovePrinterConnection clPrinters.Item(i+1), true
There are currently 1 users browsing this thread. (0 members and 1 guests)