PDA

View Full Version : Assigns a printer to a computer depending on the OU (All)



Leonski
02-04-2004, 05:32 PM
My goal is to have a logon script that assigns a printer to a computer depending on the OU it belongs to.
Easier is to use group policy for each ou so that each ou has its own logon script (or at least that aspect would be scripted). You would set the logon script in group policy and set add the computers in that group policy to be applied to. The trick is you have to also enable loopback in group policy so that the user confirmation setting of the logon script gets looped back to the user who is loggin into that computer.

In my case I do prefer to have one login .VBS script which will assign a printer to a computer depending on the OU it belongs to. Why not to use Group Policy? Well, I’m working at school and we have lots of different OU in Active Directory. I don’t want to create 50 new GPO and 50 logon scripts for each of 50 OU just to assign printers. Every year these printers script would be need to be delete/change/modify etc. With one logging script it would much more convenient for me anyway to manage all printers for every OU in a domain.

Lots of login scripts examples exist on the net but unfortunately I haven’t found one that will assign printer to a computer depending on the OU it belongs to. I would greatly appreciate if someone can give me the sample of such login script. My WSH and VBScripting skills are primitive at this stage but with good code explanations I would manage to modify it for my needs.

Regards, Leon

hardmandez
02-17-2004, 05:01 AM
Hi Leon,

Did you get anywhere with this. I would be interested in seeing such a script.

Thanks

Hardmandez

dineshcooper
02-19-2004, 05:50 PM
Im not sure if this code example could help you but while i was reading it, some bells went of in my head reminding me of your post.

http://cwashington.netreach.net/depo/view.asp?Index=816&ScriptType=vbscript