Share via


Net print command

Applies To: Windows 7

The net print command has been deprecated in Windows® 7.

Additional information

Prior to Windows 7, the net print command was used to display print jobs and shared queues. For each queue, the display listed the size and status of each job, and the status of the queue. Based on usage data and the fact that there were multiple ways to perform the same tasks, the net print command was removed in Windows 7.

Workaround

The prnjobs.vbs Visual Basic script, located in the %windir%\System32\Printing_Admin_Scripts\en-US directory, can be used to perform similar tasks to net print. For a complete list of command-line options available for the prnjobs.vbs script, at a command prompt, navigate to the %windir%\System32\Printing_Admin_Scripts\en-US directory, and then type the following command:

cscript prnjobs.vbs -?

The following is a mapping of net print commands to their equivalent prnjobs.vbs script usage commands:

  1. List jobs in queue:

    net print <PrinterName> ? cscript prnjobs.vbs -l -p <PrinterName> -l
    
  2. Pause a job:

    net print <PrinterName> <JobID> /hold ? cscript prnjobs.vbs -p <PrinterName> -j <JobID> -z
    
  3. Resume a job:

    net print <PrinterName> <JobID> /release ? cscript prnjobs.vbs -p <PrinterName> -j <JobID> -m
    
  4. Delete/cancel a job:

    net print <PrinterName> <JobID> /delete ? cscript prnjobs.vbs -p <PrinterName> -j <JobID> -x
    

Note

Many of these tasks can also be performed by using PowerShell (see Welcome to the TechNet Script Center Gallery!) or by using WMI (see Win32_PrintJob Class).