Windows Server Windows Server: Print

Summary

This module contains actions for viewing & managing printers, printer ports, & print drivers on a Windows Server.

Actions

windows_server.print.

add_port

Add a printer port.

Minimum Plugin Version: 5.3.0

Input
  • windows_server: a WindowsServer dictionary

  • name: name of the printer port (including the ':' prefix if required)

  • ip_address: optional port IP address if adding a network port

Output

Nothing is outputted by this action.

Example
1
2
3
4
5
- windows_server.print.add_port:
    name: "Example Port:"
    ip_address: 1.2.3.4
  load:
    windows_server: windows_server

windows_server.print.

add_printer

Add a printer.

Minimum Plugin Version: 6.1.0

Input
  • windows_server: a WindowsServer dictionary

  • name: name of the printer

  • driver: name of the print driver

  • port: name of the port to use

  • shared: set to true to share the printer on the network (defaults to false)

  • share_name: optional name to give the printer if shared is true (defaults to the supplied name)

Output

Nothing is outputted by this action.

Example
1
2
3
4
5
6
7
8
- windows_server.print.add_printer:
    name: Example Printer
    driver: Example Driver
    port: "example-port:"
    shared: true
    share_name: Example Share Name
  load:
    windows_server: windows_server

windows_server.print.

display_drivers

Display print drivers in a table.

The table will have the following columns:

  • Name
  • Manufacturer
  • Environment

Minimum Plugin Version: 5.3.0

Input
  • text: the title of the table

  • drivers: any number of PrintDrivers

Output

Nothing is outputted by this action.

Example
1
2
3
4
5
6
7
8
9
- windows_server.print.get_drivers:
  load:
    windows_server: windows_server
  save: drivers

- windows_server.print.display_drivers:
    text: All Installed Print Drivers
  load:
    drivers: drivers

windows_server.print.

display_ports

Display printer ports in a table.

The table will have the following columns:

  • Name
  • Description

Minimum Plugin Version: 5.3.0

Input
  • text: the title of the table

  • ports: any number of PrinterPorts

Output

Nothing is outputted by this action.

Example
1
2
3
4
5
6
7
8
9
- windows_server.print.get_ports:
  load:
    windows_server: windows_server
  save: ports

- windows_server.print.display_ports:
    text: All Printer Ports
  load:
    ports: ports

windows_server.print.

display_printers

Display printers in a table.

The table will have the following columns:

  • Name
  • Port
  • Shared
  • Published
  • Status

Minimum Plugin Version: 5.3.0

Input
  • text: the title of the table

  • printers: any number of Printers

Output

Nothing is outputted by this action.

Example
1
2
3
4
5
6
7
8
9
- windows_server.print.get_printers:
  load:
    windows_server: windows_server
  save: printers

- windows_server.print.display_printers:
    text: All Installed Printers
  load:
    printers: printers

windows_server.print.

get_drivers

Get all print drivers installed on the supplied Windows Server.

Minimum Plugin Version: 5.3.0

Input
Output

A list of PrintDrivers.

Example
1
2
3
4
- windows_server.print.get_drivers:
  load:
    windows_server: windows_server
  save: drivers

windows_server.print.

get_ports

Get all printer ports in use on the supplied Windows Server.

Minimum Plugin Version: 5.3.0

Input
Output

A list of PrinterPorts.

Example
1
2
3
4
- windows_server.print.get_ports:
  load:
    windows_server: windows_server
  save: ports

windows_server.print.

get_printers

Get all printers installed on the supplied Windows Server.

Minimum Plugin Version: 5.3.0

Input
Output

A list of Printers.

Example
1
2
3
4
- windows_server.print.get_printers:
  load:
    windows_server: windows_server
  save: printers

windows_server.print.

port_in_use

Determine if the supplied printer port is in use.

Minimum Plugin Version: 5.3.0

Input
  • windows_server: a WindowsServer dictionary

  • name: name of the printer port

Output

A boolean is outputted by this action:

  • true if the port is in use

  • false if the port is not in use

Example
1
2
3
4
5
- windows_server.print.port_in_use:
    name: "COM3:"
  load:
    windows_server: windows_server
  save: port_in_use

windows_server.print.

remove_printer

Remove a printer.

Minimum Plugin Version: 5.3.0

Input
  • windows_server: a WindowsServer dictionary

  • name: name of the printer

Output

Nothing is outputted by this action.

Example
1
2
3
4
- windows_server.print.remove_printer:
    name: Example Printer
  load:
    windows_server: windows_server

windows_server.print.

select_driver

Display print drivers in a table & prompt the task operator to select one.

The table will have the following columns:

  • Name
  • Port
  • Shared
  • Published
  • Status

Minimum Plugin Version: 5.3.0

Input
  • text: the title of the table

  • drivers: any number of PrintDrivers

Output

A single PrintDriver.

Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
- windows_server.print.get_drivers:
  load:
    windows_server: windows_server
  save: drivers

- windows_server.print.select_driver:
    text: Select a Print Driver
  load:
    drivers: drivers
  save: driver

windows_server.print.

select_drivers

Display print drivers in a table & prompt the task operator to make a selection.

The table will have the following columns:

  • Name
  • Manufacturer
  • Environment

Minimum Plugin Version: 5.3.0

Input
  • text: the title of the table

  • drivers: any number of PrintDrivers

  • minimum: the minimum number of selections

  • maximum: the maximum number of selections

Output

A Selection containing:

Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
- windows_server.print.get_drivers:
  load:
    windows_server: windows_server
  save: drivers

- windows_server.print.select_drivers:
    text: Select Print Drivers
  load:
    drivers: drivers
  save: selection

windows_server.print.

select_port

Display printer ports in a table & prompt the task operator to select one.

The table will have the following columns:

  • Name
  • Description

Minimum Plugin Version: 5.3.0

Input
  • text: the title of the table

  • ports: any number of Printers

Output

A single Printer.

Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
- windows_server.print.get_ports:
  load:
    windows_server: windows_server
  save: ports

- windows_server.print.select_port:
    text: Select Printer Port
  load:
    ports: ports
  save: selected_port

windows_server.print.

select_ports

Display printers in a table & prompt the task operator to make a selection.

The table will have the following columns:

  • Name
  • Description

Minimum Plugin Version: 5.3.0

Input
  • text: the title of the table

  • ports: any number of PrinterPorts

  • minimum: the minimum number of selections

  • maximum: the maximum number of selections

Output

A Selection containing:

Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
- windows_server.print.get_ports:
  load:
    windows_server: windows_server
  save: ports

- windows_server.print.select_ports:
    text: Select Printer Ports
  load:
    ports: ports
  save: selection

windows_server.print.

select_printer

Display printers in a table & prompt the task operator to select one.

The table will have the following columns:

  • Name
  • Port
  • Shared
  • Published
  • Status

Minimum Plugin Version: 5.3.0

Input
  • text: the title of the table

  • printers: any number of Printers

Output

A single Printer.

Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
- windows_server.print.get_printers:
  load:
    windows_server: windows_server
  save: printers

- windows_server.print.select_printer:
    text: Select a Printer
  load:
    printers: printers
  save: printer

windows_server.print.

select_printers

Display printers in a table & prompt the task operator to make a selection.

The table will have the following columns:

  • Name
  • Port
  • Shared
  • Published
  • Status

Minimum Plugin Version: 5.3.0

Input
  • text: the title of the table

  • printers: any number of Printers

  • minimum: the minimum number of selections

  • maximum: the maximum number of selections

Output

A Selection containing:

Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
- windows_server.print.get_printers:
  load:
    windows_server: windows_server
  save: printers

- windows_server.print.select_printers:
    text: Select Printers
  load:
    printers: printers
  save: selection