Posts Tagged ‘Printers’

Windows Server 2008 enables you to track print job success and failure on a logical printer.

 

You can audit access and usage to a logical printer as follows:

 

  1. Select the printer you wish to audit for printing and management. Right-click and select Properties; then select the Security tab.
  2.  On the Security tab, click the advanced button, which launches the Access Control Setting dialog box for the   logical printer. Click the Auditing tab.
  3.  On the Auditing tab, click Add and select the group or groups you want to access. Choose the Success or Failure audits you want to trap and click Apply.

 

That’s all there is to auditing printer usage. To check the audits, refer to the system log in Event Viewer.

Advertisements

Windows Server 2003 uses a service to control the spooling of print jobs. If this service isn’t running, print jobs can’t be spooled. You can check the status of the Print Spooler using the Services utility. Follow these steps to check and restart the Print Spooler service:

  1. In Administrative Tools, click or double-click Computer Management.
  2. Right-click the Computer Management entry in the console tree and select Connect To Another Computer on the shortcut menu. You can now choose the system whose services you want to manage.
  3. Expand the Services And Applications node by clicking the plus sign (+) next to it, and then choose Services.
  4. Select the Print Spooler service. The Status should be Started. If it isn’t, right-click Print Spooler and then select Start. The Startup Type should be Automatic. If it isn’t, double-click Print Spooler and then set Startup Type to Automatic.
  5. If this doesn’t resolve the problem, you might want to check other related services, including
    • TCP/IP Print Server (if installed)
    • Print Server for Macintosh (if installed)
    • Print Server for UNIX (if installed)

    Tip

    Spoolers can become corrupted. Symptoms include a frozen printer or one that doesn’t send jobs to the print device. Sometimes the print device might print pages of garbled data. In most of these cases stopping and starting the Print Spooler service resolves the problem. Other spooling problems might be related to permissions.

 

An understanding of how printing works can go a long way when you’re trying to troubleshoot printer problems. When you print documents, many processes, drivers, and devices work together to print the documents. If you use a printer connected to a printer server, the key operations are as follows:

  • Printer driver

    When you print a document in an application, your computer loads a printer driver. If the print device is attached to your computer physically, the printer driver is loaded from a local disk drive. If the print device is located on a remote computer, the printer driver might be downloaded from the remote computer. The availability of printer drivers on the remote computer is configurable by operating system and chip architecture. If the computer can’t obtain the latest printer driver, it’s probably because an administrator hasn’t enabled the driver for the computer’s operating system. For more information, see the section of this chapter entitled “Managing Printer Drivers.”

  • Local print spool and print processor

    The application you’re printing from uses the printer driver to translate the document into a file format understandable to the selected print device. Then your computer passes the document off to the local print spooler. The local spooler in turn passes the document to a print processor, which creates the raw print data necessary for printing on the print device.

  • Print router and print spooler on the print server

    The raw data is passed back to the local print spooler. If you’re printing to a remote printer, the raw data is then routed to the print spooler on the print server. On Windows Server 2003 systems, the printer router, Winspool.exe, handles the tasks of locating the remote printer, routing print jobs, and downloading printer drivers to the local system, if necessary. If any one of these tasks fails, the print router is usually the culprit. See the sections of this chapter entitled “Solving Spooling Problems” and “Setting Printer Access Permissions” to learn possible fixes for this problem. If these procedures don’t work, you might want to replace or restore Winspool.exe.

    The main reason for downloading printer drivers to clients is to provide a single location for installing driver updates. This way, instead of having to install a new driver on all the client systems, you install the driver on the print server and allow clients to download the new driver. For more information on working with printer drivers, see the section of this chapter entitled “Managing Printer Drivers.”

  • Printer (print queue)

    The document goes from the print spooler into the printer stack—which in some operating systems is called the print queue—for the selected print device. Once in the queue, the document is referred to as a print job—a task for the print spooler to handle. The length of time the document waits in the printer stack is based on its priority and position within the printer stack. For more information, see the section of this chapter entitled “Scheduling and Prioritizing Print Jobs.”

  • Print monitor

    When the document reaches the top of the printer stack, the print monitor sends the document to the print device, where it’s actually printed. If the printer is configured to notify users that the document has been printed, you see a message confirming this.

    The specific print monitor used by Windows Server 2003 depends on the print device configuration and type. The default monitor is Localmon.dll. You might also see monitors from the print device manufacturer, such as Hpmon.dll, which is used with most Hewlett-Packard print devices. This DLL (dynamic-link library) is required to print to the print device. If it’s corrupted or missing, you might need to reinstall it.

  • Print device

    The print device is the physical device that prints documents on paper. Common print device problems and display errors include

    • Insert Paper Into Tray X
    • Low Toner
    • Out Of Paper
    • Out Of Toner; Out Of Ink
    • Paper Jam
    • Printer Offline

Group Policy can affect your ability to install and manage printers. If you’re having problems and believe they’re related to Group Policy, the key policies you’ll want to examine are those in

  • Computer Configuration\Administrative Templates\Printers
  • User Configuration\Administrative Templates\Control Panel\Printers
  • User Configuration\Administrative Templates\Start Menu And Taskbar

Problem

You want to install the File Server Resource Manager on a Windows Server 2003 R2 computer.

Solution

Using a graphical user interface
  1. Open the Configure Your Server wizard. Click Next to bypass the initial Welcome screen.

  2. On the Server role screen, select File Server and click Next. Click Next twice to begin.

  3. On the File Server environment screen, select one or more of the following optional components:

    Replicate data to and from this server

    Installs DFS Replication Service

    Manage a SAN (Storage Area Network)

    Installs Storage Manager for SANs

    Share files with UNIX systems

    Installs Microsoft Services for NFS

    Share files with Apple Macintosh computers

    Installs File Services for Macintosh

  4. Click Next to continue. Reboot the server if prompted to do so.

Discussion

Installing the File Server role on a Windows Server 2003 R2 computer enables a number of mandatory components, as well as provides the options to configure optional pieces to enable additional functionality. At a minimum, the File Server role will install Storage Reporting, Disk Quotas, File Screening, and the DFS Management MMC snap-in.

Problem

You want to deploy printers to a group of users or computers using a GPO.

Solution

Using a graphical user interface

To deploy a printer using Group Policy, you must first push the printer installation settings to a GPO as follows:

  1. Open the Print Management MMC snap-in. Double-click on the print server you want to manage and then click Printers.

  2. Right-click the printer you want to manage and select “Deploy with Group Policy.”

  3. From the Deploy with Group Policy dialog box, click Browse to select a GPO and click OK.

  4. Select one or both of the following:

    • The users that this GPO applies to (per user), to allow a printer connection to follow a user to multiple computers
    • The computers that this GPO applies to (per machine), to allow a printer connection to be available to any user who logs on to a particular computer
  5. Select Add and then OK when you’re finished.

    Using a command-line interface

    After you’ve created the appropriate GPO, add the following to a startup script (for per-machine printer connections) or to a logon script (for per-user printer connections):

    	> pushprinterconnections.exe -log

    Discussion

    A common complaint with previous versions of the Windows Server operating system was the inability to easily push printer settings to clients using Group Policy. This has been greatly improved with the Print Management Console in R2, as you now have a “Deploy with Group Policy” option built right into the MMC console. You can deploy printers on a per-user or per-computer basis; the former is useful for users whose printer connections need to follow them from computer to computer, while the latter is useful in a branch office or lab setting where all users of a particular computer need access to the same printer.

Problem

You want to add or remove print drivers on a print server.

Solution

Using a graphical-user interface

To add a print driver to a print server, do the following:

  1. Open the Print Management MMC snap-in.

  2. Double-click on the Print Servers node, then the print server that you want to manage.

  3. Right-click on the Drivers node and select Add Driver. Click Next to continue.

  4. On the Processor and Operating System Selection screen, place a checkmark next to the processors and OSes that will be used by your client computers. Click Next to continue.

  5. Select the manufacturer and model of the printer, or click Have Disk to use a manufacturer-supplied print driver.

  6. Click Next and then Finish to add the driver.

To manage existing print drivers, do the following:

  1. Open the Print Management MMC snap-in.

  2. Double-click on the Print Servers node, then the print server that you want to manage.

  3. Right-click on the Drivers node and select Manage Drivers.

  4. To add a new driver, click Add and follow the instructions in the previous section. To delete an installed driver, click Remove. To reinstall a print driver from media, click Re-Install.

  5. Click OK when you’re finished.

Using a command-line interface

To add a printer driver, enter the following:

	> cscript prndrvr.vbs -a -v 3 -e "Windows NT x86"

To delete a printer driver, use the following syntax:

	> cscript prndrvr.vbs d m "<DriverName>" v 3 e "Windows NT x86"

To list the printer drivers that are installed on a print server, use the following:

	> cscript prndrvr.vbs l

Problem

You want to create a printer filter to view only specific printers within the Print Management Console.

Solution

Using a graphical user interface
  1. Open the Print Management Console MMC snap-in.

  2. Right-click on Custom Printer Filters and select Add New Printer Filter.

  3. Enter a name and description for the printer filter. Optionally, place a checkmark next to “Display the total number of printers.” Click Next to continue.

  4. On the “Define a printer filter” screen, you can specify up to three conditions for the filter.

  5. In the Field drop-down box, select one of the following:

    • Printer Name
    • Queue Status
    • Jobs in Queue
    • Server Name
    • Comments
    • Driver Name
    • Is Shared
    • Location
    • Share Name
  6. For the Condition drop-down, select one of the following:

    • is exactly
    • is not exactly
    • begins with
    • not begin with
    • ends with
    • not end with
    • contains
    • not contain
  7. In the Value textbox, type a value that the condition should meet.

  8. When you have entered all necessary information, click Next to continue.

  9. On the Set Notifications (Optional) page, select one or both of the following:

    Send e-mail notification

    This will send an email whenever a printer that meets the criteria of the filter is found. Enter the recipient email address(es), sender email address, SMTP server, and message.

    Run script

    This will run a script whenever a printer that meets the criteria of the filter is found. Enter the path to the script and any command-line arguments.

  10. Click Finish to create the filter.

Discussion

One of the new features of the Print Management Console is the ability to create one or more custom printer filters using WMI information. This provides you with an at-a-glance view of all the printers in your environment, as well as printers that meet one or more specific criteria. There are three default print filters available when you first launch the PMC: All Printers, Printers Not Ready, and Printers With Jobs. You can create additional filters based on the printer name, queue status, the number of jobs in a queue, etc.

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.