Automating Control Panels

by Jul 25, 2023

Windows Control Panel is the GUI center for any system configuration. You can launch control panel via console command, too: control [ENTER]. However, even PowerShell embraces the control panel:

Get-ControlPanelItem lists all available control panel items, and you can search for control panel items by name or description. This line finds the control panel item that is related to “print”:

PS> Get-ControlPanelItem -Name *print*

Name                 CanonicalName                Category             Description                                      
----                 -------------                --------             -----------                                      
Devices and Printers Microsoft.DevicesAndPrinters {Hardware and Sound} View and manage devices, printers, and print jobs

Show-ControlPanelItem can then be used to open one or more control panel items. Note that these cmdlets cannot automate settings changes, but they can help to quickly identify and open the GUI-based control panel items. Rather than investing multiple clicks to open control panel and find the appropriate control panel item, to manage, let’s say, local printers, you could as well use your PowerShell console and enter:

PS> Show-ControlPanelItem -Name *print*

Note: *-ControlPanelItem cmdlets work only in Windows PowerShell.