+ Post New Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 17
Windows Server 2000/2003 Thread, Print Management per-computer GPO delivery in Technical; Up until now to map network printers I've been using vbs login scripts mixed with GPO loopback functionality based on ...
  1. #1
    randle's Avatar
    Join Date
    Dec 2006
    Location
    Chelmsford, Essex
    Posts
    595
    Thank Post
    66
    Thanked 16 Times in 15 Posts
    Rep Power
    19

    Print Management per-computer GPO delivery

    Up until now to map network printers I've been using vbs login scripts mixed with GPO loopback functionality based on OU location but ideally want to use the Print Management console included in Win 2k3 R2 which uses pushprinterconnection.exe to deploy on a per computer level.

    The way this is meant to work as I understand it is that if a computer is moved out of the applying OU, the pushprinterconnection.exe should remove the mapping. The problem I'm having is that when the computer is removed from the OU the printer mapping still remains even after multiple boots, forced group policy update and even manual deletion.

    Googling this, it seems that this may be a bug when using this on a per-computer configuration and some mention that the mapping gets tattooed onto the users registry which is why this still appears even after manual deletion.

    Has anyone else had any joy with this or found a workaround?

  2. #2

    Join Date
    Jul 2010
    Location
    Bristol
    Posts
    2
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    We are getting exactly the same thing on Server 2008 R2. Printers are deployed using Print Management but they roam with the user so when they next log on the previous printer appears as well as the current one! this can get annoying if teachers use multiple PCs as they start to collect them and end up with 10 printers on some occasions!

    Not found a workaround as yet, but it's doing my head in!

  3. #3
    randle's Avatar
    Join Date
    Dec 2006
    Location
    Chelmsford, Essex
    Posts
    595
    Thank Post
    66
    Thanked 16 Times in 15 Posts
    Rep Power
    19
    Went with my own mix of logon/logoff vbs scripts in the end which work just as well. Shame though as wanted a central management for this.

  4. #4

    Join Date
    Jul 2010
    Location
    Bristol
    Posts
    2
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Could i be cheeky, and possibly ask you to post one of your logon / logoff scripts for this purpose?

    It would be interesting to know what commands are run at which stage.

  5. #5
    mounters's Avatar
    Join Date
    Mar 2006
    Location
    Northumberland
    Posts
    199
    Thank Post
    22
    Thanked 70 Times in 59 Posts
    Rep Power
    29
    Quote Originally Posted by timprice View Post
    We are getting exactly the same thing on Server 2008 R2. Printers are deployed using Print Management but they roam with the user so when they next log on the previous printer appears as well as the current one! this can get annoying if teachers use multiple PCs as they start to collect them and end up with 10 printers on some occasions!

    Not found a workaround as yet, but it's doing my head in!
    If you have 2008R2 DCs then don't use the Print Management console, use Group Policy Preferences instead. You get much more control over how printers apply and can set deletes/replace on each preference item to ensure printers don't build up.

  6. #6

    Join Date
    Dec 2009
    Posts
    607
    Thank Post
    8
    Thanked 36 Times in 34 Posts
    Rep Power
    17
    I use loopback and Logon for printers .. What type of profiles are you using ? I use the following script which works good ..

    'VBScript.' Updated June 2009 Luke Taylor
    'Purpose of script is to remove and add multiple network printers And Set the Time
    '************************************************* **************************

    ON ERROR RESUME NEXT

    Set WshNetwork = WScript.CreateObject("WScript.Network")

    'Remove old printers
    WshNetwork.RemovePrinterConnection "\\server\BWLaser", True, True

    'Install new Printers
    WshNetwork.AddWindowsPrinterConnection "\\server\BWLaser"

    'set default Printer
    WshNetwork.SetDefaultPrinter "\\server\BWLaser"

    'Clean Up Memory Used
    Set WshNetwork = Nothing

    wscript.quit

    have a try of that and see if it fixes your problem ? its a logon script btw .. If it does not work like this , try adding every printer you have into the remove old printers section .

  7. #7
    randle's Avatar
    Join Date
    Dec 2006
    Location
    Chelmsford, Essex
    Posts
    595
    Thank Post
    66
    Thanked 16 Times in 15 Posts
    Rep Power
    19
    Currently I use Two logon scripts. One to remove all existing 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
    And another to add the required printer
    ' Map Printer
    ' ******************************
    Option Explicit
    Dim netPrinter, UNCpath
    UNCpath = "\\server\printer"
    Set netPrinter = CreateObject("WScript.Network")
    netPrinter.AddWindowsPrinterConnection UNCpath
    WScript.Quit
    I want to merge these together similar to the above script but for testing purposes was ideal at the time to be separate.
    Last edited by randle; 28th January 2011 at 11:18 AM.

  8. #8

    Join Date
    Oct 2008
    Posts
    67
    Thank Post
    1
    Thanked 9 Times in 6 Posts
    Rep Power
    14
    We use con2prt.exe to set printers on each PC. A batch file runs at logon to pick up some Environment Variables to set default and other printers dynamically.

  9. #9

    Join Date
    Feb 2011
    Posts
    82
    Thank Post
    1
    Thanked 5 Times in 4 Posts
    Rep Power
    8
    If you have that problem you might want to look at the local machine policy in the registry under the system / currentcontrol set 001 , 002 , 003 / connections. You will find those little nasty's hidden there!

    I wrote a script that removes those old connection keys when the PC has changed OU.

    you could add something like this to the computer startup in a batch file:

    reg delete "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\P rint\Connections\,,myprintserver,oldprinter-bw" /f
    reg delete "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet003\Control\P rint\Connections\,,myprintserver,oldprinter-bw" /f
    Last edited by MaXiM; 14th February 2011 at 12:57 AM.

  10. #10
    randle's Avatar
    Join Date
    Dec 2006
    Location
    Chelmsford, Essex
    Posts
    595
    Thank Post
    66
    Thanked 16 Times in 15 Posts
    Rep Power
    19
    The first script I use above removes the stuck printers from the registry location you mention and appears to work nicely with a mix of GPO loopback

  11. #11

    Join Date
    Apr 2011
    Location
    Wolverhampton
    Posts
    4
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Quote Originally Posted by mounters View Post
    If you have 2008R2 DCs then don't use the Print Management console, use Group Policy Preferences instead. You get much more control over how printers apply and can set deletes/replace on each preference item to ensure printers don't build up.
    Have been trying to deploy printers for W7 with GPP, for students using roaming profiles. GPP prefs don't delete the queues either when out of scope of AD container or item level targetting. Also tried deployed printers option, but again queues are'nt removed when out of scope, currently trying to find logoff script to delete queues. Which method do you use, can you help.? Thank you.

  12. #12

    Join Date
    Feb 2011
    Posts
    82
    Thank Post
    1
    Thanked 5 Times in 4 Posts
    Rep Power
    8
    Print Management console works fine if you remember to remove the printers using the console when they fall out of scope. Then you will not get those left overs.. If you get the left overs because you forgot to remove the printers using the console then the script i posted does that.

    As far as windows 7 goes you can still use the print management console or in some places I have worked I used con2prt.exe in the user login script to map the printers during login, that seems to work well also.

  13. #13

    Join Date
    Feb 2011
    Posts
    82
    Thank Post
    1
    Thanked 5 Times in 4 Posts
    Rep Power
    8
    Example .vbs script to delete network printers on logoff

    On Error Resume Next
    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

  14. #14

    Join Date
    Feb 2011
    Posts
    82
    Thank Post
    1
    Thanked 5 Times in 4 Posts
    Rep Power
    8
    Example .vbs script on computer startup that removes annoying printers that like to default themselves.
    Only use this if you don't want those printers


    On Error resume next
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")


    Set colInstalledPrinters = objWMIService.ExecQuery _
    ("Select * from Win32_Printer where DeviceID = 'Send To OneNote 2007'")
    For Each objPrinter in colInstalledPrinters
    objPrinter.Delete_
    Next

    Set colInstalledPrinters = objWMIService.ExecQuery _
    ("Select * from Win32_Printer where DeviceID = 'Microsoft XPS Document Writer'")
    For Each objPrinter in colInstalledPrinters
    objPrinter.Delete_
    Next

    Set colInstalledPrinters = objWMIService.ExecQuery _
    ("Select * from Win32_Printer where DeviceID = 'Microsoft Office Document Image Writer'")
    For Each objPrinter in colInstalledPrinters
    objPrinter.Delete_
    Next



    wscript.quit

  15. #15

    Join Date
    Feb 2011
    Posts
    82
    Thank Post
    1
    Thanked 5 Times in 4 Posts
    Rep Power
    8
    Example Con2prt.exe that can be added to user logon script using GP or local GPedit
    Obviously you need to download con2prt.exe from somewhere in the first place

    @echo off

    start "\\mydomain.local\NETLOGON\PrinterScripts\con2prt. exe /c" "\\myprintserver\Staff Room Colour Laser"

    start "\\mydomain.local\NETLOGON\PrinterScripts\con2prt. exe /cd" "\\myprintserver\Staff Room Mono Laser"


    Exit
    Last edited by MaXiM; 18th May 2011 at 09:57 PM.

SHARE:
+ Post New Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. Print Management - Clients cannot print
    By Gatt in forum Windows Server 2008 R2
    Replies: 2
    Last Post: 31st October 2010, 04:12 PM
  2. Replies: 13
    Last Post: 30th June 2009, 04:23 PM
  3. Print Green - Free Print Waste Management Software
    By sandeep2504 in forum Downloads
    Replies: 1
    Last Post: 26th June 2009, 12:56 PM
  4. R2 Print Management - Per Computer
    By Michael in forum Windows
    Replies: 3
    Last Post: 13th March 2009, 12:39 PM
  5. Print Management & GPO Printer Installs
    By RobC in forum Windows Vista
    Replies: 1
    Last Post: 7th July 2006, 09:42 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •