Windows PowerShell is an extensible command-line shell and scripting language from Microsoft. It is designed for system administrators and developers to control and automate the administration of Windows-based systems. Get-PnpDevice is a Windows PowerShell command used to retrieve the Plug and Play (PnP) devices on a computer.
This article will provide an overview of the Get-PnpDevice command, including its syntax, parameters, inputs, outputs, examples, and tips. We will also answer some of the most common questions about the command.
What is the Syntax for Get-PnpDevice?
The syntax for the Get-PnpDevice command is as follows:
Get-PnpDevice [-InstanceId] <String[]> [-Class <String[]>] [-FriendlyName <String[]>] [-PresentOnly] [-IncludeHidden] [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] [-AsJob] [-CimClassName <String>] [-CimNamespace <String>] [-DeviceInstanceId <String[]>] [-DeviceInterfaceClass <String[]>] [-DeviceInterfaceInstanceId <String[]>] [-DeviceInterfaceName <String[]>] [-DeviceName <String[]>] [-DevicePath <String[]>] [-DeviceStatus <String[]>] [-DriverName <String[]>] [-DriverVersion <String[]>] [-Enumerator <String[]>] [-HardwareId <String[]>] [-Manufacturer <String[]>] [-PDOType <String[]>] [-Status <String[]>] [-SystemName <String[]>] [-Verbose] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]
What are the Parameters for Get-PnpDevice?
The parameters for the Get-PnpDevice command are as follows:
Parameter | Description |
---|---|
-InstanceId | Specifies the instance ID of the device. |
-Class | Specifies the class of the device. |
-FriendlyName | Specifies the friendly name of the device. |
-PresentOnly | Indicates that the command should only return devices that are present on the system. |
-IncludeHidden | Indicates that the command should include hidden devices in the output. |
-InformationAction | Specifies how the command should process information. |
-InformationVariable | Specifies the name of the variable to store the information. |
-CimSession | Specifies the CIM session to use for the operation. |
-ThrottleLimit | Specifies the maximum number of concurrent operations that can be established to run the cmdlet. |
-AsJob | Indicates that the command should run as a background job. |
-CimClassName | Specifies the CIM class name. |
-CimNamespace | Specifies the CIM namespace. |
-DeviceInstanceId | Specifies the device instance ID. |
-DeviceInterfaceClass | Specifies the device interface class. |
-DeviceInterfaceInstanceId | Specifies the device interface instance ID. |
-DeviceInterfaceName | Specifies the device interface name. |
-DeviceName | Specifies the device name. |
-DevicePath | Specifies the device path. |
-DeviceStatus | Specifies the device status. |
-DriverName | Specifies the driver name. |
-DriverVersion | Specifies the driver version. |
-Enumerator | Specifies the enumerator. |
-HardwareId | Specifies the hardware ID. |
-Manufacturer | Specifies the manufacturer. |
-PDOType | Specifies the PDO type. |
-Status | Specifies the status. |
-SystemName | Specifies the system name. |
-Verbose | Indicates that the command should display verbose output. |
-WarningAction | Specifies how the command should process warnings. |
-WarningVariable | Specifies the name of the variable to store the warnings. |
<CommonParameters> | This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, OutBuffer, OutVariable, WarningAction, and WarningVariable. |
What are the Inputs for Get-PnpDevice?
The inputs for the Get-PnpDevice command are the parameters listed above. You can use any combination of parameters to filter the output of the command.
What are the Outputs for Get-PnpDevice?
The outputs for the Get-PnpDevice command are objects that contain information about the Plug and Play (PnP) devices on the computer.
What are Some Examples of Get-PnpDevice?
Here are some examples of the Get-PnpDevice command:
- To get all the PnP devices on the computer, use the following