Install and manage a Print Server in Server Core

After you’ve found out you can turn your Server Core installation of Windows Server 2012 into a full-fledged File Server, I bet you’re curious how you could transform it into a highly performing Print Server. You’re in luck, because that’s the topic of today’s article! Let’s dive into the Print and Document Services Server Role.

Sander BerkouwerMVP By Sander Berkouwer - Thu, May 30, 2013 - 3 comments

Sander Berkouwer is a Microsoft Certified Professional and a Microsoft Most Valuable Professional (MVP) with over a decade of experience in IT.

Articles in this series

Server Roles in Sever Core

The Print Server Server Role has been a part of Server Core installations since Windows Server 2008.

Print and Document Services Server Role in Server Core

In Server Core installations of Windows Server 2012, the Print and Document Services Server Role features four Role Services:

  • Print Server
    This is the core of every Windows Server 2012–based Print Server. When you install the Print and Document Services Server Role, this Role Service is installed by default.
  • Distributed Scan Server
    The Distributed Scan Server Role Service provides a central administration point for sharing and managing DSM-aware network scanners.
  • Internet Printing
    The Internet Printing service creates a website where users can manage print jobs on a Print Server. It also enables users who have the Internet Printing Client installed to use a web browser to connect and print to shared printers by using the Internet Printing Protocol (IPP).
  • LPD Service
    The Line Printer Daemon service enables UNIX-based computers or other computers using the Line Printer Remote (LPR) service to print to shared printers on a Windows Print Server.

How to install the Print and Document Services Server Role

Turning a Windows Server 2012–based Server Core installation into a Print Server is pretty easy. You’ll only need one PowerShell command:

Install Print Services

Install Print Services

As mentioned previously, this installs the Print Server Role Service automatically too.

How to add printers to a Server Core Print Server

A Print Server without printers is likely to become a sad server, even when it’s a Server Core installation. It’s time to add some printers.

You can add printers in three ways in Windows Server 2012–based Server Core installations:

  • Use the (old) Printing Admin scripts.
  • Use the Print Server-related PowerShell cmdlets.
  • Use the Graphical User Interface (GUI).

Using the (old) printing admin scripts

When the Print Server Role is installed, a special folder is created on your hard disk. This folder contains the (old) *.vbs-style Printing Admin scripts. The scripts are located in a subfolder with the installed language (most likely en-US) of the C:\Windows\System32\Printing_Admin_Scripts folder.

The following scripts are available:

  • Prncnfg.vbs
  • Prndrvr.vbs
  • Prnjobs.vbs
  • Prnmngr.vbs
  • Prnport.vbs
  • Prnqctl.vbs
  • Pubprn.vbs

Printing_Admin_Scripts

Printing_Admin_Scripts

It’s good to see these trusty old scripts on Windows Server 2012–based Server Core installations because this means you can reuse your current printer configuration scripts.

A line to add a printer port would look something like this:

To add a printer on this printer port, you could use a line that looks like:

After you’ve created the printer, you can share it:

When the Print Server is a member of an Active Directory domain, you might also want to publish the printer in Active Directory. This is done with the following command:

The *.vbs-style commands are pretty short, but they are not very human-readable.

Using the Print Server-related PowerShell cmdlets

The promise of PowerShell is to provide a more straightforward, human-readable shell. It’s good to know, then, that Windows Server 2012–based Server Core Print Servers come with 20 Print Server-related PowerShell cmdlets:

  • Add-Printer, Get-Printer, Set-Printer, Rename-Printer, and Remove-Printer
  • Add-PrinterDriver, Get-PrinterDriver, and Remove-PrinterDriver
  • Add-PrinterPort, Get-PrinterPort, and Remove-PrinterPort
  • Get-PrintConfiguration and Set-PrintConfiguration
  • Get-PrinterProperty and Set-PrinterProperty
  • Get-PrintJob, Restart-PrintJob, Suspend-PrintJob, Resume-PrintJob, and Remove-PrintJob

Again, we start with creating a printer port. Begin by typing PowerShell on the console of your Server Core installation and then type:

In contrast to the *.vbs-style Printing Admin scripts, you can add a printer, share it, and publish it in one line of PowerShell code:

Install Printer with PowerShell

Install Printer with PowerShell

Using the GUI

If you feel less adventurous, or if you need to create only one printer, you can use the GUI to create printers. The following command unlocks the Add Printer Wizard:

Another way to add printers with a GUI is to use the Print Management MMC Snap-in from the Remote Server Administration Tools (RSAT).

Managing printers and print jobs

With several printers installed on your Server Core Print Server, you might occasionally want to perform management tasks on the print jobs submitted by your co-workers.

Again, you can use the Print Management MMC Snap-in from the Remote Server Administration Tools (RSAT). This tool is automatically installed when you install the RSAT. For more information, read Part 1 of the Server Core Remote Management series.

Print Management

Print Management

In the left node, right-click the Print Management node and select Add/Remove Servers… from the context menu. Then, type the name of your Print Server (or Browse… to it) and click Add to list. Click OK when done. Your Server Core Print Server, its printers, and its print jobs can now be managed remotely.

On the console of the server, you can use Get-PrintJob, Restart-PrintJob, Suspend-PrintJob,Resume-PrintJob, and Remove-PrintJob to manage print jobs.

Another neat trick you might have to pull often when dealing with Print Servers is to reset the print spooler. On both Server with a GUI and Server Core Print Servers, this is done with:

Concluding

The Print Server Server Role in Server Core installations of Windows Server 2012 is a powerful Server Role, featuring most of the command-line tools available since Windows 2000 Server as well as 20 brand new PowerShell cmdlets. From a remote management perspective, Server Core Print Servers are no different than Server with a GUI Print Servers.

Series NavigationCertificate Server in Server Core - Server Core Remote Access Services -DirectAccess and Routing

-1+1 - Rate this post
Loading ... Loading ...
Disclaimer
Your question wasn't answered? Please ask in the new 4sysops forum!

3 Comments- Leave a Reply

  1. This is a great guide, I never knew about all those Print Server PowerShell cmdlets.

    The Print Server Role is a great candidate for Server Core. I may have to think about switching mine over

  2. Thomas Ehler says:

    I’ve built an App for automated simultaneous Printserver installation. Either manually or in conjunction with the option of installing via a CSV file.

    Combined with the option to build the CSV file from existing printservers through Martin Pugh’s Power Shell script, the Network Printer installer makes it possible to install one or more printservers, including hundreds of printers in a matter of hours.

    The Network Printer installer started of as an attempt to simplify simultaneous printer installations on multiple servers in a Load Balancer environment.
    Around the same time I realized Power Shell 4 has CMDlets for handling printers so to get into those I decided not using WMI.

    Note: As a consequence Network Printer installer ONLY runs on Windows 8 /server 2012 and later, and only installs on Server 2012 and later!!
    Download free from sccmdeploy.dk http://sccmdeploy.dk/?page_id=369

  3. Sander Berkouwer Sander Berkouwer says:

    Glad we could be of assistance, Thomas. :-)

Please share your thoughts in a comment!

Login

Lost your password?