Installing the Print Server Role

Posted: March 28, 2010 in Active Directory, Printers, Server, System Information
Tags: ,

Problem

You want to add the print server role on a Windows Server 2003 server.

Solution

Using a graphical user interface
  1. Open the Configure Your Server wizard.

  2. Click Next to bypass the initial Welcome screen.

  3. On the Server role screen, select Print Server and click Next.

  4. On the Summary screen, click Next to begin the installation.

  5. Specify the path to the second R2 disc if necessary, and then click Finish.

Using a command-line interface

To add the Print Server role from the command-line, first create an unattend.txt> file containing the following:

	[Networking]

	[NetServices]
	MS_Server = params.MS_Server

	[Components]
	PMCSnap = On

Once you’ve saved the file, use the following syntax to install the Print Server role:

	> sysocmgr /i:c:\windows\inf\sysoc.inf /u:c:\unattend.txt

Using VBScript
	' This code creates an unattended installation file,
	' and then installs the Print Server Role
	' ------ SCRIPT CONFIGURATION -----
	strFile = "c:\unattend.txt"
	constForWriting = 2
	strComputer = "<ServerName>" ' use "." for the local computer
	' ------ END CONFIGURATION --------

	set objFSO = CreateObject("Scripting.FileSystemObject")
	set objFile = objFSO.OpenTextFile(strFile, constForWriting, True)
	objFile.WriteLine("[Networking]")
	objFile.WriteLine("[NetServices]")
	objFile.WriteLine("MS_Server = params.MS_Server
	objFile.WriteLine("[Components]")
	objFile.WriteLine("PMCSnap = ON")
	objFile.Close

	set objWshShell = WScript.CreateObject("WScript.Shell")
	intRC = objWshShell.Run("sysocmgr /i:%windir%\inf\sysoc.inf /u:" & _
	                        strFile, 0, TRUE)
	if intRC <> 0 then
	   WScript.Echo "Error returned from sysocmgr command: " & intRC
	else
	   WScript.Echo "Print Server role installed"
	end if

Discussion

The Print Manager role is not installed by default in Windows Server 2003 R2; you need to add the role manually using Add/Remove programs or the Configure Your Server wizard. This role has been greatly improved in R2 by including the Print Management Console MMC snap-in, which provides a unified view of installed drivers and forms, printer ports, and the ability to deploy printers using Group Policy.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s