Open Printing Preferences via Printer Properties Dialogs using cmd/pwsh

Abstract: Open printer properties and printing preferences dialogs directly from the command line on Windows, Linux, and macOS.

Created: 2026-10-08 by
You can open printing preferences dialogs directly from the command line by using OS-specific utilities that invoke the native print configuration interfaces. On Windows, PowerShell and Command Prompt utilize shell commands to access printer properties. Linux systems rely on CUPS utilities or desktop environment launchers to modify print settings. macOS offers a built-in command-line tool for managing print queues and preferences.

Windows: Accessing Printer Properties via Shell Commands

On Windows, the most reliable method to open the standard "Printing Preferences" or "Printer Properties" dialog is through the Control Panel applets or the modern Settings interface. While direct command-line arguments for specific preference panes are limited, you can trigger the full printer management context which includes these options. For older versions of Windows or when using Command Prompt (cmd), the control command remains effective. You can execute the following command in your terminal:
control printers
This opens the Devices and Printers window. From there, right-clicking a specific printer and selecting "Properties" provides access to advanced tabs including "Advanced," "Sharing," and "Security." To automate this further, you can use PowerShell to invoke the shell application for printing. In PowerShell, you can use the Start-Process cmdlet to open the Printers folder directly:
Start-Process "shell:::{26EE1968-1A4D-47A4-A034-C2B4C05F5D1E}"
Alternatively, to open the general Printing preferences pane, you can use:
Start-Process "rundll32.exe" -ArgumentList "printui.dll,PrintUIEntry /p /n "YourPrinterName""
Replace "YourPrinterName" with the exact name of the installed printer as it appears in the system. The /p switch specifically opens the Printer Properties dialog for the named device, allowing immediate access to driver and queue settings without manual navigation. This approach ensures compatibility across various Windows editions while avoiding deprecated APIs.

Linux: Managing Print Queues with CUPS

Linux distributions typically use the Common Unix Printing System (CUPS) as the backend for printing tasks. While CUPS does not have a single universal CLI flag to open a graphical "Preferences" dialog due to the diversity of desktop environments, you can manage print jobs and view status via the command line. To check the current status of the print queue, use the lpq command:
lpq
If you need to pause, resume, or cancel jobs, lprm and cupsenable/cupsdisable are the standard tools. For example, to disable a printer temporarily:
cupsdisable printer_name
However, if your goal is to open the graphical preferences dialog (such as configuring paper size, duplex settings, or color profiles), you must launch the desktop environment's print manager. On GNOME-based systems, this is often achieved by launching the system settings print module:
gnome-control-center printers
On KDE Plasma, you might use:
kcmshell5 kcm_cups_printers
Note that these commands depend on the presence of the respective desktop environment packages. If you are running a headless server, graphical dialogs are not applicable, and you would instead configure printing via /etc/cups/cupsd.conf or lpadmin. Always verify your desktop environment before attempting to launch GUI components from the terminal.

macOS: Using lpstat and System Preferences

macOS provides robust command-line tools for interacting with the printing subsystem, primarily through the lp and lpstat utilities. These tools allow you to submit print jobs and query their status but do not directly open the graphical "Print Dialog" for configuration purposes. To list all installed printers and their statuses, run:
lpstat -a
To open the system's printing preferences graphically from the terminal, you can use the open command to launch the System Preferences pane dedicated to printing:
open "/System/Library/PreferencePanes/Printing.prefPane"
This action opens the Print & Scan section in System Preferences, where users can add, remove, or configure printers. Alternatively, for more programmatic control over print jobs, such as specifying page ranges or orientation, you can use the lp command with flags like -o landscape or -o sides=two-sided-long-edge.
lp -o landscape document.pdf
While this doesn't open a UI dialog, it effectively applies preferences at the job submission level, bypassing the need for manual interaction. This is particularly useful in automated scripts where consistent formatting is required.

Choosing the Right Approach for Your Workflow

The choice between opening a GUI dialog versus using command-line flags depends on whether you need interactive configuration or automated execution. For one-time setup changes, launching the OS-specific preferences pane is more intuitive. For batch processing or scripting, leveraging flags within lp, rundll32, or PowerShell provides greater precision and repeatability. Understanding the underlying architecture—whether it is Windows Shell, CUPS, or macOS Print Manager—helps in selecting the appropriate tool. Always test commands in a non-production environment first, especially when dealing with printer drivers that may behave differently across hardware models.

Frequently Asked Questions

Why does my PowerShell script fail to open printer properties?

PowerShell may fail if the printer name contains spaces or special characters. Always enclose the printer name in quotes within the argument list. Additionally, ensure you are running the script with sufficient privileges to access system resources.

Can I open printing preferences on a headless Linux server?

No, graphical preferences dialogs require a display server (X11 or Wayland). On headless servers, you must configure printing via text-based configuration files or remote web interfaces provided by CUPS.

What is the difference between lpq and lpstat on Linux?

lpq is an older utility that shows only the queue status, while lpstat is more comprehensive, providing details about classes, destinations, and jobs. lpstat is generally preferred for scripting due to its flexibility.

How do I specify paper size from the command line on Windows?

You cannot easily change default paper size via a simple command line call without modifying registry keys or using third-party tools. It is recommended to set the default paper size in the Printer Properties dialog accessed via the methods described above.

Is there a way to print silently without any dialog on macOS?

Yes, using the lp command with appropriate options allows silent printing. Ensure the file format is supported (e.g., PDF, PostScript) and that the printer accepts the data stream without requiring user confirmation.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More