MaceZ4 Posted September 2, 2011 Posted September 2, 2011 Hello! I've just started at a new school and ready for Monday I've been in for two days to see what the system is like. I've been asked by a number of teachers if there's a way to clean up the printer's list on ALL the computers... There has been a large number of support contractors in before they hired me and print servers have come and gone, but the traces of the printers attached to their names haven't... Is there a script that will just remove every printer on the list, I've seen a couple that requires knowing the name and location of the printer/share... I can then set the system to remove printers on log in for a few weeks at the start of term and get a printer deployment sorted out to help tidy up...
mhundley Posted September 2, 2011 Posted September 2, 2011 Hi, It depends on how your system is set up, assuming these computers are on the domain and you are using Group Policy then you may be be in luck, if you have access to Client Side Preferences then you can tell it to remove all printers. To do this navigate to the users preferences section and select new printer, when you get the dialogue box change the create option to delete and further down tick the checkbox for delete all printers. There is loads of info on setting up printers with GPO Preferences at this site Grouppolicy.biz If you are set on/stuck with using logon scripts then that can also be done, I have chopped a few bits out of a vbs logon script we used to use before preferences, I think this will be complete but have not tested it. On error resume next Dim objNetwork, oP, lgCnt Set objNetwork = CreateObject("Wscript.Network") Set oP=objNetwork.EnumPrinterConnections lgCnt=oP.Count Do While lgCnt>0 objNetwork.RemovePrinterConnection oP.Item(lgCnt-1),True,True lgCnt=lgCnt-2 Loop As i have said this is chopped from another script which I have successfully used in several schools, however I have lost the original source for the script so cannot publish the whole thing out of respect for the original author. My understanding of how the script works is that it looks for all network printer connections and instead of needing to know the name it simply gives it a value, the loop simply removes the printer found at an decreasing value working from the last to first printer. Give that a try and if you need any more help/my script is missing a bit (entirely likely as I am away from the proper code) please feel free to reply and we will see what we can do for you.
PiqueABoo Posted September 2, 2011 Posted September 2, 2011 To do this navigate to the users preferences section and select new printer, when you get the dialogue box change the create option to delete and further down tick the checkbox for delete all printers. Seconded and when that works, throw away whatever made the original mess, leave that delete-all GPP entry there in #1 position and add new ones to deploy the printers...but endeavour to keep the targeting consistent/comprehensible - with great power comes great responsibility etc.
lordasb Posted September 5, 2011 Posted September 5, 2011 we use kix scripts to handle and clear printers from real machines andy
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now