Show-ControlPanelItem
Published: February 29, 2012
Updated: September 18, 2012
Applies To: Windows PowerShell 3.0
Show-ControlPanelItem
Syntax
Parameter Set: RegularName Show-ControlPanelItem [-Name] <String[]> [ <CommonParameters>] Parameter Set: CanonicalName Show-ControlPanelItem -CanonicalName <String[]> [ <CommonParameters>] Parameter Set: ControlPanelItem Show-ControlPanelItem [[-InputObject] <ControlPanelItem[]> ] [ <CommonParameters>]
Detailed Description
The Show-ControlPanelItem cmdlet opens control panel items on the local computer. You can use it to open control panel items by name, category, or description, even on systems that do not have a user interface, and you can pipe control panel items from Get-ControlPanelItem to Show-ControlPanelItem.
Show-ControlPanelItem searches only the control panel items that can be opened on the system. On computers that do not have Control Panel or File Explorer, Show-ControlPanelItem searches only control panel items that can open without these components.
This cmdlet is introduced in Windows PowerShell 3.0. It works only on Windows 8 and Windows Server 2012. Because this cmdlet requires a user interface, it does not work on Server Core installations of Windows Server.
Parameters
-CanonicalName<String[]>
Opens control panel items with the specified canonical names or name patterns. Wildcards are permitted. If you enter multiple names, Get-ControlPanelItem opens the control panel items that match any of the names, as though the items in the name list were separated by an "or" operator.
|
Aliases |
none |
|
Required? |
true |
|
Position? |
named |
|
Default Value |
none |
|
Accept Pipeline Input? |
false |
|
Accept Wildcard Characters? |
true |
-InputObject<ControlPanelItem[]>
Specifies the control panel items to open by submitting control panel item objects. Enter a variable that contains the control panel item objects, or type a command or expression that gets the control panel item objects, such as a Get-ControlPanelItem command.
|
Aliases |
none |
|
Required? |
false |
|
Position? |
1 |
|
Default Value |
none |
|
Accept Pipeline Input? |
true (ByValue) |
|
Accept Wildcard Characters? |
false |
-Name<String[]>
Opens control panel items with the specified names or name patterns. Wildcards are permitted. If you enter multiple names, Get-ControlPanelItem opens the control panel items that match any of the names, as though the items in the name list were separated by an "or" operator.
|
Aliases |
none |
|
Required? |
true |
|
Position? |
1 |
|
Default Value |
none |
|
Accept Pipeline Input? |
true (ByValue, ByPropertyName) |
|
Accept Wildcard Characters? |
true |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
-
System.String, Microsoft.PowerShell.Commands.ControlPanelItem
You can pipe a name or control panel item object to Show-ControlPanelItem.
Outputs
The output type is the type of the objects that the cmdlet emits.
-
None
This cmdlet does not return any output.
Examples
Example 1: Open a Control Panel Item
PS C:\> Show-ControlPanelItem –Name AutoPlay
Example 2: Pipe a control panel item to Show-ControlPanelItem
This command opens the Windows Firewall control panel item on the local computer. It uses the Get-ControlPanelItem cmdlet to get the control panel item and the Show-ControlPanelItem cmdlet to open it.
PS C:\> Get-ControlPanelItem –Name "Windows Firewall" | Show-ControlPanelItem
Example 3: Use a file name to open a control panel item
This command opens the Programs and Features control panel item by using its application name. The .cpl file name extension is not required in the command.
This method is an alternative to using a Show-ControlPanelItem command.
In Windows PowerShell 3.0, you can omit the .cpl file name extension for control panel item files because it is included in the value of the PathExt environment variable.
PS C:\> appwiz
Related topics