Solved

Secondary Domain Controller as Print Server

Posted on 2008-06-24
4
589 Views
Last Modified: 2008-07-02
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
Comment
Question by:kmount
  • 2
  • 2
4 Comments
 
LVL 8

Accepted Solution

by:
Sinder255248 earned 500 total points
ID: 21863301
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
 

Author Comment

by:kmount
ID: 21879387
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
 
LVL 8

Expert Comment

by:Sinder255248
ID: 21893392
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
 

Author Comment

by:kmount
ID: 21918442
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

Join & Write a Comment

Mapping Drives using Group policy preferences Are you still using old scripts to map your network drives if so this article will show you how to get away for old scripts and move toward Group Policy Preference for mapping them. First things f…
Introduction You may have a need to setup a group of users to allow local administrative access on workstations.  In a domain environment this can easily be achieved with Restricted Groups and Group Policies. This article will demonstrate how to…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now