This is my first post here at EduGeek... I can't believe I have been able to survive without this resource for so long! Thanks for all of the help other threads have given me over the past few months.
We are attempting to redesign our layout here and I have been put in charge of the print architecture. Here is my problem:
As with any establishment such as this I have a number of buildings, floors and rooms to fit up. A requirement that has been handed to me from above is that we will be implementing "Line of Sight" printing, which means printers must be mapped to workstations based on their location.
I was hoping to be able to do this with W2k3R2, having GPOs assigned to OUs that are based on the locational heirarchy (Bulding 1 > Floor 2 > Room 3 etc). R2 deploys printers absolutely perfectly. HOWEVER!
Another requirement is that workstations are often reassigned to different rooms. R2 promised me that if I simply moved the workstation to the appropriate new OU (workstations are not moved often enough to warrent the bit being automated) it would drop the old printer mappings and add the new one(s). But - it doesnt, the whole thing screws up and gets me in a right pickle. (As Friez documents in here).
What I need is a script that will give me this functionality - unfortunately I am not confident enough in scripting to even know where to start.
- On computer start, clear print mappings
- On computer start, query the AD for the OU that the workstation is in
- Map the printer that is appropriate for the OU
And hopefully this would solve the problem!
I realise that this might sound a bit waffley so feel free to ask me any questions that would aid in clariffication.
We use R2 to deploy printer based on location exactly as you are trying to do.
I wasnt aware of any issue in moving a machine from one OU to another until I read your post. So this afternoon I've put it to the test.
Thankfully all works as its supposed too. Only the printers assigned to the particular OU are available, and ones from previous OU's are gone.
The only slight confusion was that after moving the computer and rebooting the first print dialog box that appeared sometimes listed the printers from the previous OU only. Closing the dialog box and trying again gave the correct list.
About half way down is a VBS script I use for mapping printers based on active directory OU. Been using this for a year now, and it's been ultra reliable, and works a treat! I can't take credit for the script, I found it on a scripting site. With a slight modification you can run the same script at logoff to remove the printer connections. This can be useful if you use roaming profiles to stop the printers being saved to the profile.