ltunstall Posted March 10, 2008 Posted March 10, 2008 Hi guys. we are having problems with kids printing rubbish to printers when they are not even in that department we want the printer in the room/department to me mapped and then when they log on!! and then when they log off it gets removed. so that when they go to there next class they only have the printer in the room they are in. Im just bin unsure how to do this can you help thanks!!
cookie_monster Posted March 10, 2008 Posted March 10, 2008 (edited) You could use a logoff script or add this to the start of a logon script. Dim WSHPrinters, WSHNetwork, Path On error resume next 'Remove ALL old printers Set WSHNetwork = CreateObject("WScript.Network") Set WSHPrinters = WSHNetwork.EnumPrinterConnections For LOOP_COUNTER = 0 To WSHPrinters.Count - 1 Step 2 'To remove only networked printers use this If Statement If Left(WSHPrinters.Item(LOOP_COUNTER +1),2) = "\\" Then WSHNetwork.RemovePrinterConnection WSHPrinters.Item(LOOP_COUNTER +1),True,True End If 'To remove all printers incuding LOCAL printers use this statement and comment out the If Statement above 'WSHNetwork.RemovePrinterConnection WSHPrinters.Item(LOOP_COUNTER +1),True,True Next Set WSHPrinters = Nothing Set WSHNetwork = Nothing 'Quit the Script wscript.quit Edited March 10, 2008 by cookie_monster
plexer Posted March 10, 2008 Posted March 10, 2008 we do that as shown above, the first part of our add printers vbs delets existing connections and then adds new one based on where they are. Ben
Michael Posted March 10, 2008 Posted March 10, 2008 In Windows Server 2003 R2, you can push out printers on a User or Computer basis, or a combination of the two (per OU).
richardp Posted March 10, 2008 Posted March 10, 2008 Scripting is the way to go, I have done something similar that looks at the AD OU and maps a default printer depending on what room they are in. However don't you have any print management software running to stop users printing unless they have credit? We use Print Manager Plus from softwareshelf, it works well and stops anyone printing to any printer unless we grant them credit. It also gives you a way reporting how much is printed over time etc... Richard
boomam Posted March 10, 2008 Posted March 10, 2008 Just a thought, but if you have printers allocated by room via a GPO, you wont have to bother with scripts. .
plexer Posted March 10, 2008 Posted March 10, 2008 What's the mechanism for removing them then when you go to a different room/ou? If they're not removed it's cumulative. Ben
Michael Posted March 10, 2008 Posted March 10, 2008 Well you'd have to create an OU and GPO for each room where you'd want to push out a particular printer. Move the Computer Objects into the relevant OU, then configure distribution using the Print Management tool. I've always pushed out printers on a user basis, however I know the computer option is also there; but never tried it in practice. This guide helped me, so I am sure it'll help you. Using GPOs is also very easy to remove printers, as and when printers are changed or upgraded (for example).
m1ddy Posted March 10, 2008 Posted March 10, 2008 There is also a cheap piece of software called Autoprint that looks at the AD location field for computers / printers. We just use scripts that a GPO runs when students log on. it finds the VBS on the local machine which points to a VBS on our 2003 print server etc.
Bestbett Posted March 10, 2008 Posted March 10, 2008 Couldn't you only allow the computers in the room you want to print to the printer Print permission?
powdarrmonkey Posted March 10, 2008 Posted March 10, 2008 No, permission to print is a user property. I wrote a bodge-it script that takes one parameter - the name of the printer you want - and then I call it from a group policy object per room. Works fine.
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