Skip to main content

Windows Printer Policy

Updated over a week ago

The Windows Printer Policy in Swif lets you centrally configure and manage printers on Windows devices. Instead of using ad‑hoc scripts or manual setup, you define printers once in a policy and assign them to device groups. Swif’s Windows agent will then:

  • Automatically add the configured printers to each device in the group

  • Set their default options (driver, duplex, color, paper size, connection type)

  • Remove any previously managed printers that are no longer defined in the policy


Requirements

  • Supported OS: Windows 10, version 1709 (10.0.16299) and later

  • Supported platform: Windows devices with the Swif agent installed and enrolled in your Swif team


What this policy does

When you assign a Windows Printer Policy to a device or device group:

  1. Swif reads the list of printers from the policy.

  2. For each printer:

    • Creates/updates the TCP/IP or LPR port

    • Installs and binds the specified Windows printer driver

    • Configures printer defaults such as duplex mode, color mode, and paper size

    • Optionally sets a printer as the default for the device

  3. Swif removes any previously managed printers that:

    • Were added by this policy earlier, but

    • Are no longer listed in the current policy configuration

This ensures each device’s printer list always matches what you defined for its group.


Policy fields

At the top level, the policy contains a single field:

printers (array)

  • Display name: Printers

  • Description: List of printers to be configured on the device. Each printer entry defines the connection details and driver information needed to install the printer automatically.

  • Type: Array of dictionaries (each dictionary is one printer)

  • Required: No (but the policy is only useful if you add at least one printer)

  • Minimum OS: Windows 10+

Each item in printers has the following sub‑fields:


1. Printer Name

  • Description: The display name for the printer as it will appear on the device.

  • Type: String

  • Required: Yes

  • Example value:

    • Operations HP LaserJet

    • Procurement Epson 01

Best practice:
Use a name that clearly indicates location and purpose (e.g., “Ops – 3rd Floor – HP M506”).


2. IP Address

  • Description: The static IP address or hostname of the printer.

  • Type: String

  • Required: Yes

  • Example values:

    • 192.168.1.100

    • printer-procurement-01.internal.company.com

Notes:

  • A static IP is recommended to avoid printers “disappearing” when DHCP changes.

  • You can use either an IP address or a resolvable hostname.


3. Port Number

  • Description: The TCP/IP port number for the printer connection.

  • Type: Integer

  • Required: No (default applies)

  • Default: 9100

  • Allowed range: 165535

Typical usage:

  • Most network printers using RAW/TCP printing use port 9100 (default).

  • If your environment uses a different port or a print server configuration, enter the specific port number here.


4. Driver Name

  • Description:
    The exact name of the printer driver to use. This must match an available driver on Windows.
    Common examples:

    • Microsoft IPP Class Driver

    • HP Universal Printing PCL 6

    • HP LaserJet M506 PCL 6

  • Type: String

  • Required: Yes

  • Default: Microsoft IPP Class Driver

Important:

  • The value must match the driver name installed/available on Windows (as you see it in Printer properties or the driver list).

  • If the driver doesn’t exist, Windows may fail to add the printer correctly.


5. Set as Default Printer

  • Description: Whether to set this printer as the default printer on the device.

  • Type: Boolean

  • Required: No

  • Default: false

Behavior:

  • true → Swif sets this printer as the default printer.

  • If multiple printers in the policy are marked true, the agent will follow its internal ordering; avoid multiple defaults in one policy if you want predictable outcomes.


6. Duplex Mode

  • Description: The duplex (double‑sided printing) mode for the printer.

  • Type: String

  • Required: No

  • Default: OneSided (exact constant in system)

  • Options:

    • OneSided – Single‑sided printing

    • TwoSidedLongEdge – Double‑sided, flipped on the long edge (book style)

    • TwoSidedShortEdge – Double‑sided, flipped on the short edge (notepad style)

Use cases:

  • Set TwoSidedLongEdge for general office printing to save paper.

  • Use OneSided for labels or documents where duplex doesn’t make sense.


7. Color Mode

  • Description: The default color mode for the printer.

  • Type: String

  • Required: No

  • Default: Color (exact constant in system)

  • Options:

    • Color – Full color printing

    • Grayscale – Black & white / grayscale

Use cases:

  • Force Grayscale for cost‑sensitive departments to reduce color toner usage.

  • Leave Color enabled for design or marketing teams that need color output.


8. Paper Size

  • Description: The default paper size for the printer.

  • Type: String

  • Required: No

  • Default: Letter

  • Options:

    • Letter

    • A4

    • Legal

    • A3

    • A5

    • Tabloid

Typical choices:

  • North America: Letter or Legal

  • Most of the world: A4

Make sure the printer’s physical tray is loaded with the matching size.


9. Connection Type

  • Description: The connection protocol used to communicate with the printer.

  • Type: String

  • Required: No

  • Default: TCPIP

  • Options:

    • TCPIP – Standard TCP/IP (RAW) port

    • LPR – LPR/LPD‑style printing

Guidance:

  • Use TCPIP for most modern network printers (default).

  • Use LPR only if your print environment or server explicitly requires LPR/LPD.


Verifying the printers on a device

After assigning the policy and allowing the device to sync:

  1. On the Windows device, open:
    Settings → Bluetooth & devices → Printers & scanners

  2. Look for the printer(s) defined in your policy (e.g., “Operations HP LaserJet”).

  3. Open the printer’s Properties and verify:

    • Printer exists with the correct name

    • IP address matches the ipAddress in the policy

    • Port number matches portNumber (e.g., 9100)

    • Driver name matches driverName (e.g., Microsoft IPP Class Driver)

    • Device shows this printer as Default (when isDefault = true)

    • Duplex mode, color mode, and paper size reflect the policy defaults

    • Connection type aligns with your configuration (TCPIP or LPR)

If you later update the policy (add/remove printers or change settings) and re‑assign it, Swif will re‑apply the configuration and adjust printers on the device accordingly.

Did this answer your question?