Home > Windows Server Tips > Windows Systems and Network Administration > Creating printer ports and shared printers in a clustered environment
Windows Server Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

WINDOWS SYSTEMS AND NETWORK ADMINISTRATION

Creating printer ports and shared printers in a clustered environment


david savoie
09.08.2003
Rating: --- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


This tip explains how to create printer ports and shared printers programmatically in a clustered environment.

Assumptions:

  • Kerberos support for the cluster has been enabled for each clustered resource as per: PSS ID Number: 235529
  • Access to Resource Kit Utility REGINI

    There are two steps to this process:

    1. Define printer ports on each node of the cluster.
    2. Create shared printers on each node of the cluster.

    Define printer ports:

    NOTE: Printer ports should be defined on each node of the cluster. If you have a range of printers, you may want to manually split the range between the two virtual nodes.

    Step1: Use IP.bat to Create portmaker batch file.

    Rename IP.txt to Portmaker.bat. This file will be used to create ports on PRINT_NODE1 node of the cluster.

    Perform the same process for PRINT_NODE2. Modify IP.bat to reflect the new range of printer ports and PRINT_NODE:

    FOR /L %%I IN (128,1,254) DO CALL :TEST %%I

    Listing for IP.bat
    FOR /L %%I IN (0,1,127) DO CALL :TEST %%I

    :TEST
    ECHO CALL PORT.BAT 192.168.0.%1 >>IP.TXT
    ECHO CALL PORTCREATE.BAT PRINT_NODE1>>IP.TXT.

    PORTMAKER.BAT Sample output

    CALL PORT.BAT 192.168.0.0
    CALL PORTCREATE.BAT PRINT_NODE1
    CALL PORT.BAT 192.168.0.1
    CALL PORTCREATE.BAT PRINT_NODE1

    Port.bat creates the port.ini file that Portcreate.bat uses to apply the registry changes using the Regini Resource Kit utility. Note the GUID. Each virtual server stores its resources under a different GUID. You will need to verify this manually using REGEDT32.

    Listing for Port.bat

    echo >port.ini RegistryMachineClusterResources222eca55-e86a-4b3f-9091- c47d6f7ac5e6ParametersMonitorsStandard TCP/IP PortPortsIP_%1
    echo >>port.ini HostName = REG_SZ
    echo >>port.ini HWAddress = REG_SZ
    echo >>port.ini IPAddress = %1
    echo >>port.ini PortNumber = REG_DWORD 9100
    echo >>port.ini Protocol = REG_DWORD 1
    echo >>port.ini SNMP Community = REG_SZ "public"
    echo >>port.ini SNMP Enabled = REG_DWORD 1
    echo >>port.ini SNMP Index = REG_DWORD 1
    echo >>port.ini Version = REG_DWORD 1

    Listing for Portcreate.bat

    regini -m \%1 port.ini

    Creating print shares:

    Use the following two batch files to mass-create shared printers. Sample listing of PRINTCREATE.BAT:

    CALL DRIVER.BAT 8N7 PRINT_NODE1 192.168.0.1 Xerox Docuprint N32

    Listing of Driver.bat

    rundll32 printui.dll,PrintUIEntry /if /b "%1" /c \%2 /f %windir% infntprint.inf /r "IP_%3" /m "Xerox Docuprint N32" /h "Intel" /v "Windows NT 4.0 or 2000" /u /Z

    rundll32 printui.dll,PrintUIEntry /Xs /c \%2 /n "\%2%1" comment "%4 %5 %6"

    rundll32 printui.dll,PrintUIEntry /Xs /c \%2 /n "\%2%1" location "%1"

    NOTE: If the driver does not exist on the second node, you can run the following command on the second node to install the driver:

    rundll32 printui.dll , PrintUIEntry /id

    You may need to stop and start the cluster service on each node to refresh the print queue information held in Active Directory.

    Rate this Tip
    To rate tips, you must be a member of SearchWindowsServer.com.
    Register now to start rating these tips. Log in if you are already a member.


    Submit a Tip




    Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



    RELATED CONTENT
    Windows Server Clustering
    Windows server cluster management
    Considerations in building GeoClusters for Windows Server 2008
    Understanding quorum in Windows Server 2008 clustering
    When (and when not) to use Windows server failover clustering
    Troubleshoot Windows server clusters with ClusDiag
    Using ClusDiag for enhanced Windows server cluster reporting
    Take control of server clusters with Microsoft's ClusDiag tool
    Validating Windows server clusters with ClusPrep
    Microsoft tool simplifies Windows server cluster configuration
    Exploring the Windows Server 2003 Resource Kit: Clusfileport.dll

    Network Printer Management
    Troubleshooting Windows print spooler crashes
    Adding a standalone printer to Active Directory with Windows Vista
    A Windows administrator's guide to printer management
    Avoid print queue overload with priority printing
    How to index standalone printers in Active Directory
    How to create a network printer pool
    Turn any non-PostScript printer into a PostScript printer
    Missing Active Directory profiles messing up printer management
    Restrict printer settings rights
    Wireless laptops can't access shared printer

    Windows Systems and Network Administration
    Troubleshooting Windows application crashes or hangs
    Converting VMware ESX machines to Hyper-V format
    Using DFSR for SYSVOL replication in Windows Server 2008
    Top 25 Windows PowerShell commands for administrators
    Key DFS improvements in Windows Server 2008 R2
    Free Windows security tools every admin must have
    Group Policy makes strides in Windows Server 2008 R2
    Quick tips for troubleshooting NTFS permissions
    Common causes of Windows server security vulnerabilities
    Cutting the cost of Windows identity and access management

    RELATED RESOURCES
    2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
    Search Bitpipe.com for the latest white papers and business webcasts
    Whatis.com, the online computer dictionary

    DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



  • Server Room Design - Planning, Cooling, Maintenance
    HomeTopicsBlogsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
    About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
    SEARCH 
    TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

    TechTarget Corporate Web Site  |  Media Kits  |  Site Map




    All Rights Reserved, Copyright 2004 - 2009, TechTarget | Read our Privacy Policy
      TechTarget - The IT Media ROI Experts