VBS PrinterRemoval

What command line is required for the attached “PrinterRemoval” VBS to remove printers for all users on a Laptop or PC?  Thank You
PrinterRemoval.txt
tbrewer48Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
NiabingiConnect With a Mentor Commented:
try this

Set WshNetwork = WScript.CreateObject("WScript.Network")
PrinterPath = "\\LAGSPRN01\LAGPIS100"
WshNetwork.RemovePrinterConnection PrinterPath, true, true
0
 
plusone3055Commented:
niabingi:
Won't that only delete the priners for hte logged in user ?
0
 
NiabingiCommented:
if the previous script does not remove all the printers for all users, this should work.

I have used this in a batch file, add a seperate entry for each printer installed

Reg Delete "hkcu\Printers\connections\,,LAGSPRN01\LAGPIS100" /f
Reg Delete "hkcu\Printers\connections\,,LAGSPRN01\LAGPISxx" /f
Reg Delete "hkcu\Printers\connections\,,LAGSPRN01\LAGPISxxx" /f
0
 
tbrewer48Author Commented:
The VBS. removed \\LAGSPRN01\LAGPIS100 only for one user
The BAT. didn't remove \\LAGSPRN01\LAGPIS100 from any user.
Any advice would be greatly appreciated?
0
 
LeeTutorretiredCommented:
I've requested that this question be deleted for the following reason:

The question has either no comments or not enough useful information to be called an "answer".
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.