+ Post New Thread
Results 1 to 8 of 8
Windows 7 Thread, Inconsistent mapping of printers using Group Policy Preferences in Technical; This is really starting to wind me up! Have a number of users in an OU, linked to a Group ...
  1. #1

    Join Date
    Jan 2007
    Posts
    981
    Thank Post
    12
    Thanked 48 Times in 28 Posts
    Rep Power
    25

    Inconsistent mapping of printers using Group Policy Preferences

    This is really starting to wind me up!

    Have a number of users in an OU, linked to a Group Policy which specifies a printer mapping Group Policy user preference.

    It works fine, however random machines suddenly decide they don't want to map the printers (Typically during exams!!) - The weird thing is, if I then log in as Administrator, restart the 'Print Spooler' service on the workstations then log back in as the user and force a gpupdate the mappings decide to then...map!

    If I try to add a shared printer manually by browsing to it and double clicking it the machine thinks about it a while then throws an error 'The specified port is unknown' (Before the print spooler restart process mentioned above).

    Does anyone have any suggestions as I simply cannot be present every exam to go round restarting Print Spooler services!

    All workstations are Windows 7 in a 2008 R2 domain functional level.

    The printer (driver) in question if it makes any difference is a HP LaserJet P2015

  2. #2

    plexer's Avatar
    Join Date
    Dec 2005
    Location
    Norfolk
    Posts
    13,726
    Thank Post
    667
    Thanked 1,638 Times in 1,463 Posts
    Rep Power
    424
    What is your print server?

    Do you have win7 drivers installed on it?

    Are your clients 32bit or 64bit do you have the relevant version of the driver installed?

    Ben

  3. #3
    andy_nic's Avatar
    Join Date
    Jun 2008
    Location
    Peterborough
    Posts
    445
    Thank Post
    31
    Thanked 39 Times in 33 Posts
    Rep Power
    19
    sounds like the issue we are having

    Printing oddities - specified port is unknown

    we still have not found the cause of issue. just run a script to restart spooler and then gpupdate afterwards

  4. #4
    andy_nic's Avatar
    Join Date
    Jun 2008
    Location
    Peterborough
    Posts
    445
    Thank Post
    31
    Thanked 39 Times in 33 Posts
    Rep Power
    19
    but saying that even restart the spooler doesn't work after a while. we have had this issue for a year now only windows 7 is effected

  5. #5

    Join Date
    Dec 2011
    Location
    Bakersfield
    Posts
    14
    Thank Post
    4
    Thanked 4 Times in 3 Posts
    Rep Power
    6
    I was having these problems, but have since fixed them. I posted my information in the other thread, but just in case here is a link: Printing oddities - specified port is unknown

  6. #6

    Michael's Avatar
    Join Date
    Dec 2005
    Location
    Birmingham
    Posts
    9,262
    Thank Post
    242
    Thanked 1,572 Times in 1,252 Posts
    Rep Power
    340
    Try deploying by GPO instead of GPP.

  7. #7

    Join Date
    Jan 2007
    Posts
    981
    Thank Post
    12
    Thanked 48 Times in 28 Posts
    Rep Power
    25
    OK.

    I found a print mapping VBS script on here, and have modified it as below:

    'Name : addprinter.vbs
    'Author : Matt Davies
    'Date : 22/03/2006
    'Description : - Used to add printers for a user
    ' - Used inconjunction with group policy at Workstation level so it runs per room
    ' - Needs to be run under "USER" Logon scripts
    Option Explicit
    Dim objNetwork
    'declare the printer names - add as necessary
    Dim strUNCPrinter1
    'Dim strUNCPrinter2
    'set the UNC path to the printers you want mapped - add as necessary
    strUNCPrinter1 = "\\print\MFD_Pull_Queue"
    'strUNCPrinter2 = "\\ygg-printers\5170-Cymraeg"
    Set objNetwork = CreateObject("WScript.Network")
    'remove old printer(s) first
    'for debugging comment out next line only
    on error resume next
    objNetwork.RemovePrinterConnection strUNCPrinter1
    'objNetwork.RemovePrinterConnection strUNCPrinter2
    'Wait 3 seconds whilst windows removes the old printers
    wscript.sleep(3000)
    'Add the printer to the computer - add as necessary
    objNetwork.AddWindowsPrinterConnection strUNCPrinter1
    'objNetwork.AddWindowsPrinterConnection strUNCPrinter2
    ' Here is where we set the default printer - change if necessary
    objNetwork.SetDefaultPrinter strUNCPrinter1
    'End the script
    Wscript.Quit
    The above maps the MFD queue for all users, as most users will print to this queue then collect their work from a MFD at a later stage (Pull printing). Therefore, I have a Group Policy object with this script set to run on Logon under 'User configuration', which is applied at the root of our custom 'Computers' OU.

    In some rooms, there may be a standalone printer. Hence I have another version of the script which maps both the MFD queue and the standalone printer queue :

    'Name : addprinter.vbs
    'Author : Matt Davies
    'Date : 22/03/2006
    'Description : - Used to add printers for a user
    ' - Used inconjunction with group policy at Workstation level so it runs per room
    ' - Needs to be run under "USER" Logon scripts
    Option Explicit
    Dim objNetwork
    'declare the printer names - add as necessary
    Dim strUNCPrinter1
    Dim strUNCPrinter2
    'set the UNC path to the printers you want mapped - add as necessary
    strUNCPrinter1 = "\\print\EF17_Infotec"
    strUNCPrinter2 = "\\print\MFD_Pull_Queue"
    Set objNetwork = CreateObject("WScript.Network")
    'remove old printer(s) first
    'for debugging comment out next line only
    on error resume next
    objNetwork.RemovePrinterConnection strUNCPrinter1
    objNetwork.RemovePrinterConnection strUNCPrinter2
    'Wait 3 seconds whilst windows removes the old printers
    wscript.sleep(3000)
    'Add the printer to the computer - add as necessary
    objNetwork.AddWindowsPrinterConnection strUNCPrinter1
    objNetwork.AddWindowsPrinterConnection strUNCPrinter2
    ' Here is where we set the default printer - change if necessary
    objNetwork.SetDefaultPrinter strUNCPrinter1
    'End the script
    Wscript.Quit
    This is then applied in the same manner as above to the individual class / staff room sub OUs (located under the main custom Computers OU)

    It seems to work well and a lot faster than GPP. However, if the user is fast enough they can launch a program such as Word and the script will not have managed to have mapped the required printer as default - Any way to either speed this up or force the user to wait for the script to fully complete before being able to move the mouse / keyboard?

    Finally I noticed the mapped printers then seem to remain on the user profiles after logging out, so I was thinking I would need a 'Logoff' script to do the opposite of the 'Logon' script - Help!

    Thanks

  8. #8

    plexer's Avatar
    Join Date
    Dec 2005
    Location
    Norfolk
    Posts
    13,726
    Thank Post
    667
    Thanked 1,638 Times in 1,463 Posts
    Rep Power
    424
    There a various printer vbs scripts about then one I use for my xp machine removes all network printers first before deploying them, it loops through all the printers installed and deletes the connections to network printers that way they don't need to be explicitly declared.

    Ben

SHARE:
+ Post New Thread

Similar Threads

  1. Warning - HP Printers and Group Policy Preferences
    By ihaveaproblem in forum Windows 7
    Replies: 6
    Last Post: 18th June 2013, 08:45 AM
  2. Deploy printer using group policy - won't work
    By KevWCFE in forum Windows Server 2008
    Replies: 22
    Last Post: 1st November 2012, 11:22 AM
  3. Map admin share using Group Policy Preferences
    By fiza in forum Windows Server 2008 R2
    Replies: 0
    Last Post: 27th September 2011, 11:28 AM
  4. Tip: Use Group Policy Preferences to deploy printers to terminal server clients
    By ZeroHour in forum Thin Client and Virtual Machines
    Replies: 0
    Last Post: 26th October 2010, 12:05 PM
  5. Replies: 15
    Last Post: 11th June 2009, 03:59 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
  •