DalekSec Posted August 12, 2016 Posted August 12, 2016 Hey, Seem to have a problem with printers not installing via Group Policy in 1607, same as this article https://social.technet.microsoft.com/Forums/en-US/030ee94a-047d-460a-bc39-52351a199364/kb3163912-breaks-point-and-print-restrictions-gpo-settings?forum=winserverGP But i can't seem to find any way of fixing it, the update isnt in the list so i can't remove it. Should i try installing them by cmd or powershell instead? don't really want to go round and do them all manually! If so anyone got any cmd lines i could borrow?
KK20 Posted August 15, 2016 Posted August 15, 2016 (edited) Ever since GPP came into fruition in windows 7 I have had issues with printers not deploying correctly. So I went oldschool in W7, W8.1 and my W10 testbed and my printer script works perfectly in all versions. I run this as a (loopback merge) user logon script for each OU as necessary (it deletes, it then adds. Simple): strComputer = "." Set objWMIService = GetObject("winmgmts:" & strComputer & "\root\cimv2") Set colInstalledPrinters = objWMIService.ExecQuery ("Select * from Win32_Printer Where Network = TRUE") For Each objPrinter in colInstalledPrinters objPrinter.Delete_ Next 'add network printers appropriately Set WshNetwork = CreateObject("WScript.Network") WshNetwork.AddWindowsPrinterConnection "\\printerserver\printer" WshNetwork.SetDefaultPrinter "\\printerserver\printer" Now the reason I suggest this is because I believe this method works differently to the GPP or GPO method, the delete_ may remove something that lets you add your printers properly - I cannot say. Perhaps just give the "delete_" part a run and let your GPO install the printer afterwards? Maybe that will suppress any error messages (or remove offending parts that cause issues) Edited August 15, 2016 by KK20
Davit2005 Posted August 15, 2016 Posted August 15, 2016 I found printers weren't installing so I made the following changes in the Computers GPO and this fixed the issue for me. Have being using the GPP method for years here without issue, Computer Configuration > Administrative Templates > Printers Point and Print Restrictions ENABLED Users can only point and print to these servers: Enabled Enter fully qualified server names separated by semicolons PR19.domain.local;PR20.domain.local Security Prompts: When installing drivers for a new connection: Do not show warning or elevation prompt When updating drivers for an existing connection: Do not show warning or elevation prompt
profit10 Posted August 18, 2016 Posted August 18, 2016 I'm having some trouble getting this to work. What is a loopback merge script opposed to a normal logon script? Thanks
KK20 Posted August 18, 2016 Posted August 18, 2016 it depends how you store and run your GPOs. My script is run as a USER logs on. However, I organise my PCs as a collection of COMPUTERS. I group this script according to a collection of COMPUTERS (I.E. all computers in OU "art" will apply the "art" printer script). The problem with GPO is that you are wanting to run a USER script as part of a collection of COMPUTERS (not a collection of users). In this case you will need to use "loopback processing", i.e. loop back and look at user scripts that have been called as part of an OU of computers. Merge means it will merge this script with other user scripts (not supercede them). I cant remember offhand where loopback processing is, it is definitely in COMPUTER and within system->group policy I think. If you search for "loopback processing GPO" it is easily found.
profit10 Posted August 18, 2016 Posted August 18, 2016 Thanks I have applied the loopback policy however when the script runs I receive a script host error code 0x80041021. It states line 2 char 1. I can't see anything out of place but then I don't know any scripting! Any ideas, thanks again.
KK20 Posted August 18, 2016 Posted August 18, 2016 This is a script of mine copied verbatim. It works as it is our "library" printer logon. ' delete network printers strComputer = "." Set objWMIService = GetObject("winmgmts:" & strComputer & "\root\cimv2") Set colInstalledPrinters = objWMIService.ExecQuery ("Select * from Win32_Printer Where Network = TRUE") For Each objPrinter in colInstalledPrinters objPrinter.Delete_ Next 'add network printers appropriately Set WshNetwork = CreateObject("WScript.Network") WshNetwork.AddWindowsPrinterConnection "\\VS01_Print02\Library_LaserJet401" WshNetwork.SetDefaultPrinter "\\VS01_Print02\Library_LaserJet401" perhaps the forum mangled the "quotes"? If you have strict scripting then you might want to dim the variables. I suppose it is lazy not doing so: dim strComputer dim objWMIService dim colInstalledPrinters dim objPrinter dim WshNetwork can be placed at the top. 1
fleXx Posted August 19, 2016 Posted August 19, 2016 We were having this same problem yesterday, turned out it was actually the driver. Updated the driver from Windows update and everything then seemed fine. Only thing that was different between the drivers as far as I can tell was the fact that the driver type had changed from type 3 to type 4.
gady Posted August 19, 2016 Posted August 19, 2016 That's because printer drivers weren't invented in 1607. 1
FreelanceX Posted August 24, 2016 Posted August 24, 2016 I deploy printers via GPP like this: (I use Point and Print restrictions - Disabled) Then at TOP of User structure, create ONE printer policy. First printer - Delete all shared printers Then add each printer one at a time, item level targeted via user/computer OU. (Set as Create) If a printer is to be default, add it as the last one which is targeted to that user or computer OU. I have this working with 12+ printers with all different targets perfectly at various sites. Now, if they log on at different locations, they will only ever get the printers which are correct for that user/location. Every logon, printers are evaluated. So FYI, logon takes about 10 seconds at busy periods to pass the Printer Policy stage. But I find users are happy to wait for that, if it means they always get printers applying correctly.
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