tmcd35 Posted March 6, 2013 Posted March 6, 2013 (edited) So I've decided to build a new print server and I want to change the way our printers are deployed. I want something a little more...reliable. Our infrastructure: Windows 2008R2 Domain Controllers Windows 2008R2 Print Server (freshly built) Papercut print management software Windows 7 Pro/Ent clients We currently deploy through GPO's which, as far as I can make it out is a GUI front end to the rundll32.exe PrintUIEntry command. We assign printers per computer based on location and in a couple of staff instances per user. In some instances we do have two or three printers being setup on a machine. All users have roaming profiles. It seems that the print spooler sometimes gets upset with printers added using this method (printers shown as offline or not appearing at all until the spooler is reset). Printers are remember in userprofiles so can appear in unwanted location and then have problems because drivers are not installed in that location. And the default printer seems to be a rather random affair. I've looked at Group Policy Preferences but that does not seem to offer adding network shared printers under the Computer preferences, only under users. So, does anyone have any good advice as to how best to setup and share printers across a network so that only the right printers appear, and are always seem as working (unless there is a genuine fault), in the right locations and the proper local printer in always default? I'm thinking using a script, but all scripts I know are based on the rundll method and I can't see how that will result in anything different from the status quo. Thanks. Edited March 6, 2013 by tmcd35
Brpilot99 Posted March 6, 2013 Posted March 6, 2013 Hiyah I used to use the rundll method until I discovered the inbuilt print manager that came with 2003r2 ... I presume 2008 has it as well ... Makes deploying printers a breeze 1
sonofsanta Posted March 6, 2013 Posted March 6, 2013 You can add shared printers under User Preferences and use loopback, but I found GPP to be remarkably flakey and unreliable. 2% of the time it would decide that it couldn't see the printer and wouldn't add it, including at GP refresh - so the printer would be there for a user, and an hour and a half later it would spontaneously disappear. YMMV, as I think that was driver related for me, but I've found scripting much faster and more reliable. (Using GPO & pushprinterconnections.exe didn't remove printers as people moved rooms, so they were collecting a long list of every printer in school. That got abandoned quickly.) As cobbled together from various posts on here (I went through too many to remember the correct attribution, sorry, but thank you whoever you are), my VBS scripts are: * For a default printer, running as a logon script: Dim server Dim printer server = "\\yourServer\" printer = "The Exact Shared Name of Your Printer" Set wshNetwork = CreateObject("WScript.Network") on Error Resume Next 'Deletes all network printers Set clPrinters = wshNetwork.EnumPrinterConnections On Error Resume Next For i = 0 to clPrinters.Count - 1 Step 2 wshNetwork.RemovePrinterConnection clPrinters.Item(i+1), true Next 'Add Network printer wshNetwork.AddWindowsPrinterConnection server & printer 'Set Default Printer wshNetwork.SetDefaultPrinter server & printer * For additional printers: Dim server Dim printer server = "\\yourServer\" printer = "The Exact Shared Name of Your Printer" Set wshNetwork = CreateObject("WScript.Network") on Error Resume Next 'Add Network printer wshNetwork.AddWindowsPrinterConnection server & printer * And as a logoff script, for the belt-and-braces approach to stripping out existing printers: Set wshNetwork = CreateObject("WScript.Network") on Error Resume Next 'Deletes all network printers Set clPrinters = wshNetwork.EnumPrinterConnections On Error Resume Next For i = 0 to clPrinters.Count - 1 Step 2 wshNetwork.RemovePrinterConnection clPrinters.Item(i+1), true Next I have a GPO for each script, so the printer outside my office has two GPOs - one for when it's default and one for when it's additional. You'll have a longer list of policies but you can easily read which printers are where from AD. You need to make sure the default printer GPO is run first (i.e. lower down the list on the Linked Group Policy Objects tab) otherwise the additional printer is added then immediately stripped out. You could write a custom script for each location that added the printers in one script, just another way of doing it. I prefer being able to see and tweak printer deployment without having to delve back into the scripts. The only problem I have is the lack of logging you get with scripting; if anyone can help me there I'd be delighted. 2
flyinghaggis Posted March 6, 2013 Posted March 6, 2013 (edited) You can add shared printers under User Preferences and use loopback, but I found GPP to be remarkably flakey and unreliable. 2% of the time it would decide that it couldn't see the printer and wouldn't add it, including at GP refresh - so the printer would be there for a user, and an hour and a half later it would spontaneously disappear. YMMV, as I think that was driver related for me, but I've found scripting much faster and more reliable. It's interesting to hear youre comments regarding adding printers using GPP. We've been experiencing exactly the same problem you've described where sometimes printers simply aren't added which is causing our users a lot of frustration as they cant rely on the default printer being the correct one. It's a shame GPP don't seem to work reliably for printers as it's much neater than having to fall back to custom scripts. Seems like a very archaic approach for something that you'd think MS would have cracked by now but I guess if it works then don't knock it! @Brpilot99 : We might also need to have a play with the built in Print Manager as this seemed more sucessful than GPP but not quite as flexible as we'd like. Edited March 6, 2013 by flyinghaggis
tmcd35 Posted March 6, 2013 Author Posted March 6, 2013 @sonofsanta, thank you just the reply I was looking for. Consider those scripts nicked assimilated
sonofsanta Posted March 6, 2013 Posted March 6, 2013 @sonofsanta, thank you just the reply I was looking for. Consider those scripts nicked assimilated The ciiiiiircle of edugeeeeeek, it heeeeelps us aaaaaaaall Shout if you have any problems with it, printer deployment was my biggest headache just after migration to 2k8R2/Win7 and it took me a couple of months to get it working. @flyinghaggis: preaching to the choir there, seems ridiculous that we're going back to scripting in 2013, but it really was the best solution in terms of the end result - GPO didn't strip out printers and GPP just didn't work reliably. I had some success with GPP by setting a gpupdate /force to run via GPO - Admin Templates > System > Logon > Run these programs at user logon was the best way, as setting it as a login script delayed the appearance of the desktop by around 10 seconds - but printers would still vanish at gprefresh. Setting the GPO to stop printers being re-evaulated broke that gpupdate at logon, so it was a rock and a hard place. Scripting is still intermittently flaky, but we're talking one report a month rather than a dozen a day, so that's likely to just be general network hiccups. Try scripting. I know it seems like surrendering, but it does work; save yourself the mental scarring and switch now, honestly!
synaesthesia Posted March 6, 2013 Posted March 6, 2013 We're using GPP with absolutely no problems. A single GPO with item level targetting, works wonders and never had a single problem with it.
ricki Posted March 6, 2013 Posted March 6, 2013 HI My printers deploy ok but the default printer is flaky to apply. Richard
sparkeh Posted March 6, 2013 Posted March 6, 2013 We're using GPP with absolutely no problems. A single GPO with item level targetting, works wonders and never had a single problem with it. Ditto. GPPs have been flawless.
tmcd35 Posted March 6, 2013 Author Posted March 6, 2013 @sonofsanta, just to be certain - those script are placed in GPO's as logon scripts in the User area and processed using loopback? Do you for see any problems if a mixed two methods for a short term. Used this script on 1 print server for our 4 main ICT suites, but continued with GPO print management on the older print server and other printers until such time as I can transfer everything across to the new system? I'm thinking roaming profile problems? Although the logoff script deleting all printers might solve problems elsewhere...
tmcd35 Posted March 6, 2013 Author Posted March 6, 2013 We're using GPP with absolutely no problems. A single GPO with item level targetting, works wonders and never had a single problem with it. Anymore detail on how you've got that set up? WIM filtering and GPO loopback processsing?
Jamo Posted March 6, 2013 Posted March 6, 2013 We are looking at using RES Workspace Manager Express for that, seems to be pretty reliable on the test environment I have going at the moment.
sonofsanta Posted March 6, 2013 Posted March 6, 2013 @sonofsanta, just to be certain - those script are placed in GPO's as logon scripts in the User area and processed using loopback? Yup - with the final script above being a logoff, just to make sure printers are stripped out. I figure it saves some time at logon if the script isn't having to strip printers out, but it gets left there for belt-and-braces. Do you for see any problems if a mixed two methods for a short term. Used this script on 1 print server for our 4 main ICT suites, but continued with GPO print management on the older print server and other printers until such time as I can transfer everything across to the new system? I'm thinking roaming profile problems? Although the logoff script deleting all printers might solve problems elsewhere... The only problem I can think of is the parts that strip out existing network printers - if a printer is added by GPO it might then get stripped out by the script. Can't remember the processing order to know if GPO printers are added after scripts. You could probably add some logic to only strip out printer connections from the new server though, shouldn't be too difficult. @sparkeh, @synaesthesia - as said, I think my problems might have been driver related (there's not much on Google or in the error logs for the issues I kept bumping into). I'm using Oki printers here - mayhap you're on another make, and that's why it's working better for you? I always figured it was problematic with my specific setup rather than problematic for everyone, but after two months of fighting it I was none the wiser, really. 1
synaesthesia Posted March 6, 2013 Posted March 6, 2013 There's no filtering involved, but yes there is loopback processing. Adds a little (barely) to logon time but worth it. In a nutshell, we've got a security group for each printer and users>preferences>control panel>printers and the ILT is just "The computer is a member of the security group..." Could set that to entire OU's if you're organised that way. The default printer setting works fine for those also with local printers.
sted Posted March 6, 2013 Posted March 6, 2013 if youre having issues with gpp and printing have you set point and print up to "just get on with it" rather than the default settings. but ive had issues with gpp printers mainly being it can add minutes to logon but i believe thats a hp driver issue. I tend to use deploy printers and then add a script to all user startup to set default
synaesthesia Posted March 6, 2013 Posted March 6, 2013 One of our (a3) printers is an Oki and that just works.
sonofsanta Posted March 6, 2013 Posted March 6, 2013 One of our (a3) printers is an Oki and that just works. No idea then, as our ES8460 was one of the culprits. Ah well, all's well that ends well. Well well well.
ADMaster Posted March 6, 2013 Posted March 6, 2013 @synaesthesia I am glad it works for you because I am switching over from deploying tcp/ip printers in computer preferences to shared printers in user preferences. I've only moved one over as a test and did not use loopback processing. I just used Item level targeting. The problem I have with switching to the shared method is my users printer connections to not show up in my inventory program. Any advice on that?
kennysarmy Posted March 6, 2013 Posted March 6, 2013 I do it at logon with this batch file: @set str=%computername% @set pos123=%str:~0,3% @echo %pos123% if %pos123%==STA goto STA if %pos123%==ADO goto ADO if %pos123%==SPA goto SPA if %pos123%==WIN goto WIN etc etc :STA @echo Setup Staffroom printers here c:\windows\con2prt /f c:\windows\con2prt /cd \\ps01-v\Staff64c goto END :ADO @echo Setup Adobe test printers here c:\windows\con2prt /f c:\windows\con2prt /cd \\ps01-v\Staff64c goto END etc etc
bclarke Posted March 6, 2013 Posted March 6, 2013 Here is a script I use rundll32 printui.dll,PrintUIEntry /ga /c\\computername /n\\servername\printername sc \\computername stop spooler sc \\computername start spooler Change the computer name, server name and printer name. You can add as many as you like as long as there is a gap between each. To remove a printer just change ga to gd in the script. This will add the printer for all users.
Edu-IT Posted March 18, 2013 Posted March 18, 2013 The ciiiiiircle of edugeeeeeek, it heeeeelps us aaaaaaaall Just been doing something with that video, now it's in my head again! Thanks.
gdrinkall Posted March 25, 2013 Posted March 25, 2013 I had a lot of issues with deploying printer via a GPO, It was very intermittent with no dependency on PC or user. I have now started deploying printers using GPO but by IP address rather than print server name and it is working perfectly everytime. Its not a DNS issue like it sounds but a Microsoft "Glitch" 1
slugshead Posted March 25, 2013 Posted March 25, 2013 Some long winded ways out there! We use con2prt.exe Very simple. con2prt.exe /cd \\server\printer bam, done. (/cd is connect and default)
tmcd35 Posted March 26, 2013 Author Posted March 26, 2013 We use con2prt.exe Alas, in the backend, that is the exact same method as using RunDLL32 or GPO's. Whichever of the three frontends I use (GPO's are the easiest/friendliest GUI based) I always get the same inconsistent roaming profile messed up results. Although @gdrinkall may have an answer I haven't tried yet (god knows why I haven't). That or the scripts earlier may be the way I'd go. But thanks all any way for the various options.
mac_shinobi Posted March 26, 2013 Posted March 26, 2013 As cobbled together from various posts on here (I went through too many to remember the correct attribution, sorry, but thank you whoever you are), my VBS scripts are: Could be wrong here ( so appologies in advance ) however I think the scripts were posted on RIC's printer scripts post / thread and I can't re-call as quite some time ago but I think I used a function for the adding of the printer and setting it as default, although you can take out the setting default command out of the function so the function is used to add printers. Haven't got time this second but can dig out the post later on Basically I used the function something like so Call MyFunction("\\Server\","PrinterShareName") I suppose you could make other functions or subs that you could call to set the default printer so that each printer that is added is not set as default and that way you don't have to keep copying and pasting chunks of code and adjusting the printer share name etc. That way all the code is in the function and will be re used
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