Darryl_Wilcox Posted January 29, 2010 Posted January 29, 2010 Hi there, The problem we have is that due to the way our active directory OU's are setup we cannot assign printers via active directory. This way we have to log on and off several users and modify the registry on each pc manually and individually which takes a lot of time. The print server we have is Server 2008 R2 and our clients are all XP based. I just wondered if there was a quick and easy way to apply default printers to a computer quickly and efficiently either from the server or even the client say a quick setup program or complete working registry that we could import? Any ideas?
Guest TheLibrarian Posted January 29, 2010 Posted January 29, 2010 Assuming you are using standard print queues, there is a command shell utility available from Microsoft called CON2PRT. I think it's part of the Windows 2000 Resource Kit. Used in the login script it can add / remove network printers connected to server shares and set a network shared printer as default.
Ric_ Posted January 29, 2010 Posted January 29, 2010 The wiki is your friend... Printer Addition Based on Location 1
Darryl_Wilcox Posted February 1, 2010 Author Posted February 1, 2010 Read the wiki and it's very helpful, thank you. However I do have a question, although it probably sounds stupid, you could put this in a GPO in the Computers Active Directory group, and it will apply to all my sub groups of computers yes? And I'm assuming as you can have a random group after a group that monitors the first 4 characters you could have another group in there monitoring the first 5 letters as well?
K.C.Leblanc Posted February 1, 2010 Posted February 1, 2010 The wiki is your friend... Printer Addition Based on Location We use a method similar to this, works very well.
Ric_ Posted February 1, 2010 Posted February 1, 2010 @Darryl_Wilcox: See the 'split' section at the bottom of that page for another example or inspecting the string. It's all just simple VBScript - there's more examples at http://www.technet.com You run the script as a login script. Printer settings are a 'per user' setting.
eddyc Posted February 1, 2010 Posted February 1, 2010 We use a KIX script to deploy printers, it can deploy based on user groups as well as machine OUs. All staff get the staff room connected (but not as default) and their faculty printers mapped as well (but not as default) then the printer for the room they are logging into as default. Students just get the printers for the room they are logging into and set as default - if you would like to see a copy of the script, let me know 1
PiqueABoo Posted February 1, 2010 Posted February 1, 2010 Well if it's 2008 you can use GPPs - slap one at the AD root to cover all your machines and use pretty much any targeting you can imagine. 1
Darryl_Wilcox Posted February 2, 2010 Author Posted February 2, 2010 Thanks ect, it would be nice to see a copy of the script if that is possible please? PiqueABoo, I will have a look at GPP.
eddyc Posted February 2, 2010 Posted February 2, 2010 ;############################################# ;# SET UP PRINTERS BASED ON GROUP MEMBERSHIP # ;############################################# ; ############################################## ; # SET UP PRINTERS FOR ALL STAFF (Staff Room) # ; ############################################## IF INGROUP("STAFF") ? "You are in the group 'STAFF'" $Rcode = ADDPRINTERCONNECTION ("\\SERVER24\STAFFRM$") ENDIF ; ################################## ; # SET UP PRINTERS FOR PE FACULTY # ; ################################## IF INGROUP("PE") ? "You are in the group 'PE'" $Rcode = ADDPRINTERCONNECTION ("\\SERVER24\PEOFFICE$") $Rcode = SETDEFAULTPRINTER ("\\SERVER24\PE Office HP2015n") ENDIF ;############################################### ;# DIM TO LOOK UP ACTIVE DIRECTORY INFORMATION # ;############################################### Dim $objSysInfo $objSysInfo = CreateObject("ADSystemInfo") ; ############################## ; # SET UP PRINTERS FOR A05 OU # ; ############################## If InStr($objSysInfo.computername,"ou=A5") > 0 ? "Your PC is in 'A05'" $Rcode = ADDPRINTERCONNECTION ("\\SERVER24\A05$") $Rcode = ADDPRINTERCONNECTION ("\\SERVER24\A05C$") $Rcode = SETDEFAULTPRINTER ("\\SERVER24\A05 HP2600n MONO") EndIf ; ################################# ; # SET UP PRINTERS FOR A9/A10 OU # ; ################################# If InStr($objSysInfo.computername,"ou=A9A10") > 0 ? "Your PC is in 'A9/A10'" $Rcode = ADDPRINTERCONNECTION ("\\SERVER24\A9$") $Rcode = ADDPRINTERCONNECTION ("\\SERVER24\A9C$") $Rcode = SETDEFAULTPRINTER ("\\SERVER24\A9-A10 HP2600n MONO") EndIf This is just a short snippet of the script - the actual script is massive! But hopefully this will give you the idea. Most of all KIX is free! 1
CraigM Posted February 2, 2010 Posted February 2, 2010 I second the use of GPP, we made use of it here after our migration, and it has worked like a real charm so far. The targetting feature as well is pretty darn amazing. It certainally saved us worrying about writing logon scripts.
Richie1972 Posted March 12, 2010 Posted March 12, 2010 I "third" the use of GPP. I've now got only four group policies with users and computers put into a load of groups to make targetting easier: 1. Printers targetted to users/computers 2. Software targetted to computers 3. Registry settings and file copying targetted to users/computers 4. local admin rights for computers targetted to members of staff in appropriate depts The only reasons I've got more than one policy are that there is no way to target IE proxy settings or WSUS group settings (although I suppose this could be done via registry...) Richie
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