+ Post New Thread
Results 1 to 8 of 8
Windows Server 2008 R2 Thread, Redundancy in Print Servers in Technical; Good afternoon all Right, have a new server (delayed summer project) being delivered on Friday for setting up in our ...
  1. #1
    soveryapt's Avatar
    Join Date
    Jan 2009
    Location
    Lancashire
    Posts
    2,405
    Thank Post
    648
    Thanked 277 Times in 244 Posts
    Rep Power
    78

    Redundancy in Print Servers

    Good afternoon all

    Right, have a new server (delayed summer project) being delivered on Friday for setting up in our domain which will take over as PDC and I'll use our existing PDC in its demoted state as a redundancy plan. So, I can manage the whole DHCP, DNS thing, but I'm just wondering, is there a way to make it act as a failover for printers too?

    Currently, all our printers are shared on one server and deployed using \\server.name\printer.name, whereas I'd prefer (if it's possible) to use \\domain.name\printer.name, like you can with DFS shares for files etc.

    Is this possible in 2008R2 at all? Or does anyone know of a solution to do such a thing?

    Thanks all
    Andy T

  2. #2
    ricki's Avatar
    Join Date
    Jul 2005
    Location
    uk
    Posts
    1,475
    Thank Post
    20
    Thanked 164 Times in 157 Posts
    Rep Power
    52
    Hi

    You could set up the printers on the server and duplicate all the settings from the old machine like the name,etc

    Then if the print server failed you could change the script to load the printer from the other server

    Richard

  3. Thanks to ricki from:

    soveryapt (17th October 2011)

  4. #3

    Domino's Avatar
    Join Date
    Oct 2006
    Location
    Bromley
    Posts
    4,177
    Thank Post
    217
    Thanked 1,291 Times in 801 Posts
    Blog Entries
    4
    Rep Power
    512
    Not really...

    They do have a printer export tool they recommend for kind of a manual failover... High Availability Printing with the Print Management Console

  5. Thanks to Domino from:

    soveryapt (17th October 2011)

  6. #4
    soveryapt's Avatar
    Join Date
    Jan 2009
    Location
    Lancashire
    Posts
    2,405
    Thank Post
    648
    Thanked 277 Times in 244 Posts
    Rep Power
    78
    Quote Originally Posted by ricki View Post
    Hi

    You could set up the printers on the server and duplicate all the settings from the old machine like the name,etc

    Then if the print server failed you could change the script to load the printer from the other server

    Richard
    Yeah, think I'm going to go down this route possibly as I use GP Pref for deployment, so I could just change it over from in there then.

  7. #5
    soveryapt's Avatar
    Join Date
    Jan 2009
    Location
    Lancashire
    Posts
    2,405
    Thank Post
    648
    Thanked 277 Times in 244 Posts
    Rep Power
    78
    Quote Originally Posted by Domino View Post
    Not really...

    They do have a printer export tool they recommend for kind of a manual failover... High Availability Printing with the Print Management Console
    and that looks even easier than how I was thinking .. lol ..

  8. #6
    ricki's Avatar
    Join Date
    Jul 2005
    Location
    uk
    Posts
    1,475
    Thank Post
    20
    Thanked 164 Times in 157 Posts
    Rep Power
    52

  9. Thanks to ricki from:

    soveryapt (17th October 2011)

  10. #7
    soveryapt's Avatar
    Join Date
    Jan 2009
    Location
    Lancashire
    Posts
    2,405
    Thank Post
    648
    Thanked 277 Times in 244 Posts
    Rep Power
    78
    Quote Originally Posted by ricki View Post
    Thanks, but:
    Note
    The failover cluster feature is not available in Windows Web Server 2008 or Windows Server 2008 Standard.
    And we have standard ..

  11. #8

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,804
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224
    I have this script for that. I got it from a website years ago...

    Code:
    '--------------------------------------------
    ' Author: Isaac G
    ' Date: 4/29/2008
    ' Script to update users installed printers to
    ' use secondary print server
    '
    
    Option Explicit
    
    Dim PF, StrHostPrintsrv1
    Set PF = New PrinterFailover
    
    	StrHostPrintsrv1 = "YOURPRIMARYPRINTSERVERNAME"
    	If Ping(StrHostPrintsrv1) = False Then
    	PF.PS_PROD = "YOURPRIMARYPRINTSERVERNAME"
    	PF.PS_BACKUP = "YOURSECONDARYPRINTSERVERNAME"
    	Else
    	PF.PS_PROD = "YOURSECONDARYPRINTSERVERNAME"
    	PF.PS_BACKUP = "YOURPRIMARYPRINTSERVERNAME"
    	End If	
    Public Function Ping(strHost)
    
        		Dim objPing, objRetStatus
    
        		set objPing = GetObject("winmgmts:{impersonationLevel=impersonate}").ExecQuery _
          		("select * from Win32_PingStatus where address = '" & strHost & "'")
    
        		for each objRetStatus in objPing
            		if IsNull(objRetStatus.StatusCode) or objRetStatus.StatusCode<>0 then
        			Ping = False
                		'WScript.Echo "Status code is " & objRetStatus.StatusCode
            		else
                		Ping = True
                		'Wscript.Echo "Bytes = " & vbTab & objRetStatus.BufferSize
                		'Wscript.Echo "Time (ms) = " & vbTab & objRetStatus.ResponseTime
               	 	'Wscript.Echo "TTL (s) = " & vbTab & objRetStatus.ResponseTimeToLive
            		end if
        		next
    End Function 	
    
    PF.UpdatePrinters
    
    WScript.Quit
    
    
    Class PrinterFailover
    
    	
    	'Public
    	
    	Public PS_PROD
    	Public PS_BACKUP
    	
    	' Private
    	
    	Private oShell
    	Private HKEY_CURRENT_USER
    	Private HKCU_DEFAULT_PRINTER
    	
    	Private Sub Class_Terminate()
    		Set oShell = Nothing
    	End Sub
    
    	Private Sub Class_Initialize()
    		Set oShell = WScript.CreateObject("WScript.Shell")
    		HKEY_CURRENT_USER = &H80000001	
    	
    		' Rev2
    		HKCU_DEFAULT_PRINTER = "HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows\Device"
    		' end rev2
    
    	End Sub
    
    	Public Function UpdatePrinters()
    	
    		Dim v, ar, i, j
    
    		ar = arPrinters()
    
    		Dim retValueNames
    		Dim retValueTypes
    		
    		Dim sKeyPath: sKeyPath = "Printers\Connections\"
    		
    		Dim RegFullKeyPath
    		
    		Dim arRegVal()
    		
    		Dim nName : nName = 0
    		Dim nType : nType = 1
    		Dim nVal  : nVal  = 2
    		
    		' rev2
    		Dim PrintersUpdated: PrintersUpdated = False	
    		Dim DefPrinter: DefPrinter = DefaultPrinter()
    		' End rev 2
    
    		For i = 0 to UBound(ar, 1)
    
    			If InStr(ar(i), PS_PROD) > 0 Then
    			
    				'WScript.Echo "Updating printer key: " &  ar(i)
    				
    				' rev2
    				PrintersUpdated = True
    				' end rev2
    
    				RegFullKeyPath = sKeyPath & ar(i)
    				
    				Call EnumRegVals(RegFullKeyPath, _ 
    				                 retValueNames, _
    				                 retValueTypes)
    				
    				ReDim arRegVal(3, UBound(retValueNames))
    				
    				For j = 0 To UBound(retValueNames) 
    				  '  WScript.Echo "Value Name: " & retValueNames(j)  & " : " & oShell.RegRead("HKCU\" & RegFullKeyPath & "\" & retValueNames(j) )
    				    
    				    arRegVal(nName, j) = retValueNames(j)
    				    
    				    arRegVal(nType, j) = RegTypeNameFromVal(retValueTypes(j))
    				    
    				    arRegVal(nVal,  j) = oShell.RegRead("HKCU\" & RegFullKeyPath & "\" & retValueNames(j))
    				    
    				Next
    				
    				oShell.RegDelete "HKCU\" & RegFullKeyPath & "\"
    				
    				For j = 0 to UBound(arRegVal, 2)
    					oShell.RegWrite Replace("HKCU\" & RegFullKeyPath & "\" & arRegVal(nName, j), PS_PROD, PS_BACKUP), _
    					Replace(arRegVal(nVal, j),PS_PROD, PS_BACKUP), _
    					arRegVal(nType, j)
    				Next
    			
    			End If
    		Next
    		
    		' rev2
    		' Only update the default printer if we failed over something
    		If PrintersUpdated Then
    			UpdateDefaultPrinter(DefPrinter)
    		End If
    		'end rev2
    		
    	End Function
    
    
    	Public Sub EnumRegVals(ByVal sKeyPath, _
    			       ByRef retValueNames, _
    			       ByRef retValueTypes)
    	
    	' WMI reference
    	
    	' http://msdn.microsoft.com/en-us/library/aa390387(VS.85).aspx
    
    		Dim sComp: sComp = "."
    		Dim i, oReg
    		
    		Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_ 
    		   sComp & "\root\default:StdRegProv")
    
    
    		oReg.EnumValues HKEY_CURRENT_USER, sKeyPath,_
    		   retValueNames, retValueTypes
    			
    	End Sub
    	
    	
    	Private Function RegTypeNameFromVal(RegType)
    		const REG_SZ = 1
    		const REG_EXPAND_SZ = 2
    		const REG_BINARY = 3
    		const REG_DWORD = 4
    		const REG_MULTI_SZ = 7
    		
    		Dim s
    		
    		Select Case RegType
    		Case REG_SZ
    		   s =  "REG_SZ"
    		Case REG_EXPAND_SZ
    		   s = "REG_EXPAND_SZ"
    		Case REG_BINARY
    		   s = "REG_BINARY"
    		Case REG_DWORD
    		   s = "REG_DWORD"
    		Case REG_MULTI_SZ
    		   s = "REG_MULTI_SZ" ' Even though RegWrite won't suppor this type
    		End Select
    		
    		RegTypeNameFromVal = s
    		
    	End Function
    	
    	Private Function arPrinters()
    	
    		Dim sComp: sComp = "."
    		Dim sKeyPath : sKeyPath = "Printers\Connections"
    		Dim ar, subkey, oReg
    
    		Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_ 
    		sComp & "\root\default:StdRegProv")
    	
    		oReg.EnumKey HKEY_CURRENT_USER, sKeyPath, ar
    		
    		arPrinters = ar	
    	End Function
    	
    	' rev2
    	Private Function DefaultPrinter()
    		Dim s
    		s = oShell.RegRead(HKCU_DEFAULT_PRINTER)
    		DefaultPrinter = s
    	End Function
    	
    	Private Sub UpdateDefaultPrinter(DefPrinter)
    		oShell.RegWrite HKCU_DEFAULT_PRINTER, Replace(DefPrinter, PS_PROD, PS_BACKUP)
    	End Sub
    
    	' end rev2
    
    End Class

  12. Thanks to Geoff from:

    soveryapt (17th October 2011)

SHARE:
+ Post New Thread

Similar Threads

  1. Print Server Slow in 2008
    By A5Ben in forum Windows Server 2008
    Replies: 1
    Last Post: 15th October 2009, 01:18 PM
  2. Ubuntu Print Server in RM CC3 ?
    By humberty in forum Windows
    Replies: 5
    Last Post: 19th June 2009, 04:06 PM
  3. Redundant print servers
    By ITWombat in forum How do you do....it?
    Replies: 12
    Last Post: 2nd May 2006, 10:28 AM
  4. JetDirect 170 Print Servers
    By RobC in forum Hardware
    Replies: 4
    Last Post: 25th August 2005, 07:17 AM
  5. HP Jetdirect 300x External Print Servers
    By beeswax in forum General Chat
    Replies: 11
    Last Post: 22nd August 2005, 03:37 AM

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
  •