+ Post New Thread
Results 1 to 12 of 12
Windows Server 2008 R2 Thread, Adding printer for users in domain in Technical; Hello all...Back again I want to add a printer for the domain users................ .................................................. .............................. Server 2008 R2 Workstations are ...
  1. #1

    Join Date
    Jun 2010
    Posts
    107
    Thank Post
    76
    Thanked 5 Times in 3 Posts
    Rep Power
    17

    Adding printer for users in domain

    Hello all...Back again

    I want to add a printer for the domain users................
    .................................................. ..............................
    Server 2008 R2

    Workstations are XP SP3


    Server name is Server1

    Shared printer is Room 8 Printer
    .................................................. ...................................
    Tried GPO...........nothing
    I have set up the pupils policy to include the printer
    Tried Kixtart......... nothing

    Anybody got a kix script that works...Ta John

  2. #2
    alunmjones's Avatar
    Join Date
    Jul 2009
    Location
    North Wales
    Posts
    179
    Thank Post
    8
    Thanked 10 Times in 10 Posts
    Rep Power
    12
    this should work, its a vbs i run here, i dont tend to use the user bit, but its there for me when i do

    Code:
     Dim objNetwork, objPrinters, objSysInfo, strComputerDN, strUserName
    Dim strUserDN, objUser, strGroups, objGroup, strUserDomain
    On Error Resume Next
    Set objNetwork = CreateObject("WScript.Network")
    Set objPrinters = objNetwork.EnumPrinterConnections
    strUserName = objNetwork.UserName
    strUserDomain = objNetwork.UserDomain
    Set objSysInfo = CreateObject("ADSystemInfo")
    strComputerDN = objSysInfo.ComputerName
    'remove if no individual needs a set printer
    strUserDN = objSysInfo.UserName
    Set objUser = GetObject("WinNT://" & strUserDomain & "/" & strUserName & ",user")
    strGroups = ""
    For Each objGroup In objUser.Groups
       strGroups = strGroups & ", " & objGroup.name & ","
    Next
    Set objUser = Nothing
    'stop here
    
    If InStr(LCase(strUserName), LCase("<put username here>")) Then
       objNetwork.AddWindowsPrinterConnection "\\server\<printer here>"
       objNetwork.SetDefaultPrinter "\\server\<printer here>"
    End IF
    if you want it to remove all other printers and just put the ones above in, should leave local ones alone
    add

    Code:
    For LOOP_COUNTER = 0 To objPrinters.Count - 1 Step 2
          If Left(objPrinters.Item(LOOP_COUNTER + 1), 2) = "\\" Then
          objNetwork.RemovePrinterConnection objPrinters.Item(LOOP_COUNTER + 1), True, True
          End If
      Next
    
    If InStr(LCase(strUserName), LCase("<put username here>")) Then
    ----> "add cond above here"
       objNetwork.AddWindowsPrinterConnection \\server\<printer here>

  3. Thanks to alunmjones from:

    brickwall53 (20th June 2011)

  4. #3

    Join Date
    Jun 2009
    Posts
    33
    Thank Post
    6
    Thanked 2 Times in 2 Posts
    Rep Power
    11
    Hi. As you've failed to map via two means, are you sure that it'll map at all? Have you added 32 bit printer drivers to your printer?

  5. #4

    Join Date
    Nov 2010
    Location
    California
    Posts
    137
    Thank Post
    0
    Thanked 24 Times in 22 Posts
    Rep Power
    13
    Try Group Policy Preferences - that is honestly the best way to go. I have migrated away from most of my scripts.

    What is your error log saying when you try to map the printer?

  6. #5

    Join Date
    Jun 2011
    Location
    Dublin, Ireland
    Posts
    23
    Thank Post
    6
    Thanked 3 Times in 3 Posts
    Rep Power
    7
    I think digone is right, I just did this the other day. I have S2008R2 x64 and an x86 Win7 workstation. I couldn't get the printers to deploy by computer using gpo. The problem was no x86 driver. Try adding the printer manually first off.

    I tried to add the x86 drivers on their own but it didn't recognise them. The included drivers with windows don't necessarily match the x86 version you download. I had to download the x64 version from HP (in our case) replace the standard driver and then download the identical x86 driver and finally it would add

    A little messy but so easy to deploy using print manager and gpo. Any questions let me know, I am spending the summer doing this and learning as I go!

  7. Thanks to Niall from:

    brickwall53 (30th June 2011)

  8. #6

    Join Date
    Jun 2010
    Posts
    107
    Thank Post
    76
    Thanked 5 Times in 3 Posts
    Rep Power
    17

    God I need a course on 2008r2

    Tried using "Preferences" on the Domain Policy to add the printer but as it is XP workstations they need to have a couple of additional files installed for the preferences to work I didnt know that until tday.
    So I will give it another go tomorrow

    Another thing is ...I dont think the server is set up as a print server

    Dont know if that makes any difference...

    Need to go on a course me thinks

    Ta John

  9. #7
    morganw's Avatar
    Join Date
    Apr 2009
    Location
    Cambridge
    Posts
    816
    Thank Post
    46
    Thanked 132 Times in 126 Posts
    Rep Power
    40
    As long as the printer is shared it will work, you could share a printer on a workstation and deploy that with group policy preferences if you wish. The printer server role just gives you a nice mmc snap-in and an alternate (less flexible) method to deploy printers with GPOs rather than use Group Policy Preferences. Personally I don't bother with the print server role.

  10. Thanks to morganw from:

    brickwall53 (30th June 2011)

  11. #8

    Join Date
    Nov 2010
    Location
    California
    Posts
    137
    Thank Post
    0
    Thanked 24 Times in 22 Posts
    Rep Power
    13
    Quote Originally Posted by brickwall53 View Post
    Tried using "Preferences" on the Domain Policy to add the printer but as it is XP workstations they need to have a couple of additional files installed for the preferences to work I didnt know that until tday.
    So I will give it another go tomorrow

    Another thing is ...I dont think the server is set up as a print server

    Dont know if that makes any difference...

    Need to go on a course me thinks

    Ta John
    You will need Client Side Extensions installed on the machines. You can script this with a software install GPO, or you can enable it in WSUS. Either way will work fine.

  12. Thanks to qcomer from:

    brickwall53 (30th June 2011)

  13. #9

    Join Date
    Jun 2010
    Posts
    107
    Thank Post
    76
    Thanked 5 Times in 3 Posts
    Rep Power
    17

    Sob...............sob.sob....but it saves toner

    Because I have not setup the default domain printer yet...

    If the pupils want to use a printer they have to do it the long way by "Add Printer" \\server1\ etc etc

    I have discovered that there is not as much printing waste as there was before. I can only assume that this is because the lazy pupils (who usually print rubbish) cannot be bothered to add a printer.

    Since the problem there is hardly any waste at all......


  14. #10

    Join Date
    Jun 2010
    Posts
    107
    Thank Post
    76
    Thanked 5 Times in 3 Posts
    Rep Power
    17
    Quote Originally Posted by qcomer View Post
    You will need Client Side Extensions installed on the machines. You can script this with a software install GPO, or you can enable it in WSUS. Either way will work fine.
    This sounds too good to be true. I will give it a go

    Ta John

  15. #11

    Join Date
    Sep 2010
    Posts
    614
    Thank Post
    26
    Thanked 70 Times in 65 Posts
    Rep Power
    21
    prnmgnt.vbs in system32 works well with login scripting

  16. #12

    Join Date
    Jun 2010
    Posts
    107
    Thank Post
    76
    Thanked 5 Times in 3 Posts
    Rep Power
    17

    CONNECTED AT LAST>..........................

    I used the vbs script from alunmjones and it worked. I added a welcome message at the beginning of the script to check it was the vbs script and not a client side extension that was doing the deed.

    Dead chuffed it worked

    Thanks everyone

SHARE:
+ Post New Thread

Similar Threads

  1. can parent domain users log into a sub domain
    By eastofsmeg in forum Wireless Networks
    Replies: 15
    Last Post: 27th January 2010, 03:04 PM
  2. Replies: 5
    Last Post: 10th February 2009, 05:33 PM
  3. Adding new users
    By Little-Miss in forum Network and Classroom Management
    Replies: 1
    Last Post: 12th September 2008, 10:56 AM
  4. Adding users...
    By rich0d in forum Scripts
    Replies: 2
    Last Post: 11th October 2007, 09:15 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
  •