Tactical Advice

Installing and Managing a Print Server With Server Core

This story appears in the December 2007 issue of BizTech Magazine.

Although some administrators prefer to use the built-in print servers that are now standard with many large printing devices, there are advantages to using a Windows-based print server. One example: configuring a minimal environment using Server Core to provision a print server.

Managing printers has traditionally been the bane of many administrators, but recent developments in Windows Server have streamlined the management and deployment process. Particularly overdue is the ability to deploy printers to clients using Group Policy.

Many devices, such as HP’s CP3505x Color LaserJet, come not only with an Ethernet port but also with a built-in printer server. This allows the device to be shared on a network, without the need for an additional machine to act as a print server. However, without the use of additional third-party management software, drivers may have to be installed on clients manually. This can be a time-consuming task for support staff.

The ability to roll out printers using Group Policy is built-in to Windows Server 2003 R2, Server 2008 and Server Core. Vista natively supports this feature. Windows 2000 (per-user printer connections only) and XP clients are supported with the use of a small executable file (pushprinterconnections.exe), which is run as part of a Group Policy Startup/Logon script. Some additional benefits of using Windows’ Print Services include:

  • support for printers from different manufacturers;
  • no elevation of user rights needed to install or remotely deploy a printer;
  • integration with Active Directory;
  • centralized management using the Print Management Console;
  • reduced footprint using Server Core;
  • additional features, such as access rights and printer spooling.
  • optional use of a Web interface to manage printers;
  • connecting clients to printers using the Internet Print Protocol from remote locations.

Print Management Console

The Print Management Console (PMC) in Windows Server 2008 is essentially the same as that introduced in Windows Server 2003 R2. It provides a centralized console for managing Windows-based print servers, including Server Core, and the ability to view printers that have been deployed to clients using Group Policy.

Setting up Server Core

Despite the lack of graphical interface, setting up Server Core is a breeze. Follow the installation process as you would for the full version of Windows Server, but choose the Server Core option. The administrator account initially has a blank password; you must change this the first time you log on.

Once you’re logged on as an administrator, you are presented with a command prompt. Give the server a name, assign a static IP address, activate the server and join it to a domain.

Issue the following command to activate Server Core (you will need an Internet connection to complete this successfully, so issue the command at any stage in the process at which a connection is present):

• cscript c:\windows\system32\slmgr.vbs –ato

Although a name is assigned to Server Core automatically during the install process, you should change it to something more memorable. Reboot Server Core after using netdom, with the shutdown command as shown below:

• netdom renamecomputer %computername% /newname:prnsrv1
shutdown /r

Once Server Core has rebooted, log on and assign a static IP address and DNS server. The netsh command can be used to modify TCP/IP settings. In the following commands, 10.0.0.1 represents Server Core’s IP address, 255.0.0.0 the subnet mask, 10.0.0.11 the default gateway and 10.0.0.20 a DNS server.

• netsh interface ipv4 add address “Local Area Connection” 10.0.0.1 255.0.0.0 10.0.0.11

• netsh interface ipv4 set dnsserver “Local Area Connection” static 10.0.0.20

Finally, you need to join Server Core to your Active Directory domain. In the command below, <user name> and <password> represent the logon credentials for an Active Directory user who has permission to join machines to the domain. Another reboot will be required once the command is complete.

• netdom add %computername%  /domain:<domain name> /userd:<user name> /passwordd:<password>

Optional Component Setup

As Server Core is designed to provide a minimal environment for improved performance, a small footprint and improved security, you need to install Windows Print Services as an optional component. Issue the ocsetup command as shown below, paying special attention to the role itself, as role names are case sensitive:

• start /w ocsetup Printing-ServerCore-Role

Click Yes on the Windows Package Manager dialog to restart Server Core. Once Server Core has rebooted, issue the netsh command shown below to open the ports necessary for File and Print Services.

• netsh firewall set service fileandprint enable

Configure Server Core Remotely With PMC

The good news is that the command-line work is over. Configuring Server Core’s printers and shares can all be done using PMC from Vista SP1 with Remote Server Administration Tools (RSAT) installed, or from Windows Server 2008.

Click Add Features under Features Summary in Server Manager. Expand Remote ServerAdministration Tools > Role Administration Tools, check Print Services Tools (Figure 1), click Next and then Install. Click Close on the Installation Results screen.


Figure 1


Figure 2

Figure 3

Figure 4

Figure 5

Figure 6

Now you need to add Server Core to the Print Management Console. Open PMC from Start > Administrative Tools > Print Management. In the left-hand pane of PMC, highlight Printers, right-click and select Add/Remove Servers from the menu. In the Add Servers box, type Server Core’s computer name and click Add to List. Server Core’s name should now appear in the Print Servers box. Click OK. In PMC, you should see Server Core appear under the Print Servers node, as shown in Figure 2. In this example, Server Core is called PRNSRV1.

Before adding a printer to Server Core, locate and install the drivers for your printer. Expand your printer server’s node in PMC and click Drivers. Right-click and select Add Driver from the menu. Click Next on the Welcome to the Add Printer Driver Wizard screen. For example, if you install the 32-bit version of Server Core, check x86 and click Next (Figure 3).

If you want to install a Xerox Workstation PE114 device but it’s not listed under the drivers that come preinstalled with Windows, click Have Disk and then Browse to locate the driver manually. If you’ve already downloaded the driver from the Xerox Web site, it’s just a question of finding the appropriate .inf file in the download package. Once you’ve located the driver, open it and click OK on the InstallFrom Disk dialog. The printer should now be shown in the Printers box on the Add Printer Driver Wizard dialog, as shown in Figure 4. Click Next and then Finish to install the driver. Expand the print server node in PMC and highlight Drivers, and you should see the new driver listed in the central pane.

Because you’re not physically connecting your printer to Server Core, you need to create a TCP/IP port for the print queue. Make sure that your printer has been assigned an IP address and can be contacted on your network. In PMC, highlight Printers under your print server’s node, right-click and select Add Printer from the menu. Leave the default option of Add a TCP/IP or Web Services Printer by IP address or hostname selected, and click Next. Type the DNS name or IP address of your printer in the Printer name or IP address box, and click Next. On the Printer Driver dialog, check Use an existing printer driver on the computer, and select the previously installed driver from the drop down menu (Figure 5) and click Next. On the Printer Name and Sharing Settings dialog, give the printer an appropriate share name (Figure 6), click Next and Next again on the Printer Found dialog. Once installation is completed, check Print test page at the bottom of the screen and then Finish.

Configuring Printers From the Command Line

Windows Server 2008 includes a set of scripts for printer configuration and management, which can be found in the System32 directory in the Printing_Admin_Scripts folder:

Script name

Function

Prncnfg.vbs

For printer information and configuration

Prndrvr.vbs

Printer driver management

Prnjobs.vbs

List, pause, resume or cancel a print job

Prnmngr.vbs

Configure a server’s default printer and manage printer connections

Prnport.vbs

Port configuration management

Prnqctl.vbs

Print queue management

Pubprn.vbs

Publish printer information to Active Directory

For instance, to list the printers installed on Server Core from the console, change the working directory to Windows\System32\Printing_Admin_Scripts\en-US and then issue the following command:

• cscript prnmngr.vbs –l

The prnqctl.vbs script can be used to print a test page, among other functions:

• cscript prnqctl.vbs -e -p “Xerox WorkCentre PE114 Series”

Russell Smith is an independent consultant based in the United Kingdom who specializes in Microsoft systems management.
Sign up for our e-newsletter

About the Author

Russell Smith

Russell Smith

Microsoft Technology Best Practices

Russell is a technology consultant and trainer specializing in management and security of Microsoft server and client technologies. A Microsoft Certified Systems Engineer with more than 10 years of experience, Russell’s projects have included everything from deploying Small Business Server to developing security practices on large-scale United Kingdom government IT projects. Russell is also author of Least Privilege Security for Windows 7, Vista and XP published by Packt.

Security

Heartbleed: What Should Your... |
One of the biggest security vulnerabilities has almost every user and every industry...
Why Businesses Need a Next-G... |
Devices investigate patterns that could indicate malicious activity.
Review: HP TippingPoint S105... |
Next-generation firewall can easily replace a stand-alone intrusion prevention system....

Storage

The New Backup Utility Proce... |
Just getting used to the Windows 8 workflow? Prepare for a change.
How to Perform Traditional W... |
With previous versions going unused, Microsoft radically reimagined the backup utility in...
5 Easy Ways to Build a Bette... |
While large enterprises have the resources of an entire IT department behind them, these...

Infrastructure Optimization

Businesses Must Step Careful... |
Slow and steady wins the race as businesses migrate IT operations to service providers,...
Why Cloud Security Is More E... |
Cloud protection services enable companies to keep up with security threats while...
Ensure Uptime Is in Your Dat... |
Power and cooling solutions support disaster recovery and create cost savings and...

Networking

Securing the Internet of Thi... |
As excitement around the connected-device future grows, technology vendors seek ways to...
How to Maximize WAN Bandwidt... |
Understand six common problems that plague wide area networks — and how to address them.
Linksys Makes a Comeback in... |
The networking vendor introduced several new Smart Switch products at Interop this week.

Mobile & Wireless

Mobility: A Foundational Pie... |
Other technologies rely on mobile computing, which has the power to change lives, Lextech...
Now that Office for iPad Is... |
After waiting awhile for Microsoft’s productivity suite to arrive, professionals who use...
Visualization Can Help Busin... |
Companies need to put their data in formats that make it consumable anytime, anywhere.

Hardware & Software

Review: HP TippingPoint S105... |
Next-generation firewall can easily replace a stand-alone intrusion prevention system....
New Challenges in Software M... |
IT trends such as cloud, virtualization and BYOD pose serious hurdles for software...
Visualization Can Help Busin... |
Companies need to put their data in formats that make it consumable anytime, anywhere.