Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 620
  • Last Modified:

Secondary Domain Controller as Print Server

Hello to all Experts!

Have a slight problem.  We have two servers, one primary DC and one secondary DC.  We have installed and shared all of the printers in our organization, on the secondary DC.  Now, the issue is when any user logs in, and they receive their credentials from the primary DC they do not receive the printers.  However, if by chance they authenticate against the secondary DC they do receive the printers.  How can we make it so that if they authenticate against the primary, they receive the printers?  Any help will be greatly appreciated.  The printers are all shared from the secondary DC, and are published in Active Directory.  

Thanks in advance!
0
kmount
Asked:
kmount
  • 2
  • 2
1 Solution
 
Sinder255248Commented:
What about a logon script based on group membership:

-----------------------------------------------------------------------------
Dim WSHShell, WSHNetwork, objDomain, DomainString, UserString, UserObj, Path
Set WSHShell = CreateObject("WScript.Shell")
Set WSHNetwork = CreateObject("WScript.Network")
Set oNet = CreateObject("WScript.Network")
Set objDomain = getObject("LDAP://rootDse")
DomainString = objDomain.Get("dnsHostName")
UserString = WSHNetwork.UserName
Set UserObj = GetObject("WinNT://" & DomainString & "/" & UserString)
Set objShell = CreateObject("Wscript.Shell")
Set Network = Wscript.CreateObject("Wscript.Network")


For Each GroupObj In UserObj.Groups
    Select Case GroupObj.Name
        Case "IT"
            Network.AddWindowsPrinterConnection "\\printserver\ITprinter"
    End Select
Next

For Each GroupObj In UserObj.Groups
    Select Case GroupObj.Name
        Case "Editorial"
            Network.AddWindowsPrinterConnection "\\printserver\editorialprinter"
    End Select
next
-----------------------------------------------------------------------------------
0
 
kmountAuthor Commented:
Hi Sinder255248,

Thanks for the help, and sorry for my delay in responding.  

Now, I have used a differnt script (from the one you provided).  It works well when it runs.  However, I have this script applied to a certain group of computers.  The sript has been added to the logon script of the computer configured for our "QuietRoom" OU.  At first it seemed to work just fine.  However, later on it just stopped working.  
I have ran gpresult /v and saw that the policy is being applied, and is NOT being filtered out.  Since it's applying the policy, it should connect the desktops to their respective printers.... However, it does not.  Any insight on this?  This is more of a AD question..

Thanks!
0
 
Sinder255248Commented:
How are you running the script in your GPO?  Is it being called from a batch file using the cscript command or are you running it specifying the vbs file?  Can you paste the script on here?
0
 
kmountAuthor Commented:
Hi Sinder,

The script is in a vbs file, which is being called by a gpo.  I figured out the issue with the policy not being applied to specific computers.  It was the whole "loopback" problem, and I didn't have that set to "Merge" mode.

Anyway, if you would like here is the script that I'm running.  
Option Explicit
Dim objNetwork, strLocal, strUNCPrinter1, strUNCPrinter2, strUNCPrinter3
strUNCPrinter1 = "\\server\server-share1"
strUNCPrinter2 = "\\server\server-share2"
strUNCPrinter3 = "\\server\server-share3"
Set objNetwork = CreateObject("WScript.Network")
objNetwork.AddWindowsPrinterConnection strUNCPrinter1
objNetwork.AddWindowsPrinterConnection strUNCPrinter2
objNetwork.AddWindowsPrinterConnection strUNCPrinter3
objNetwork.SetDefaultPrinter strUNCPrinter1
WScript.Quit

Thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now