< Back

Disable-PnpDevice

Wed Jan 30, 2019 5:58 pm

NAME Disable-PnpDevice



SYNOPSIS

Disables a PnP device.





SYNTAX

Disable-PnpDevice [-InstanceId] <String[]> [-CimSession <CimSession[]>] [-InformationAction {SilentlyContinue | Stop | Continue | Inquire | Ignore |

Suspend}] [-InformationVariable <System.String>] [-PassThru] [-ThrottleLimit <Int32>] [<CommonParameters>]



Disable-PnpDevice [-CimSession <CimSession[]>] [-InformationAction {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend}]

[-InformationVariable <System.String>] [-PassThru] [-ThrottleLimit <Int32>] [<CommonParameters>]





DESCRIPTION

The Disable-PnpDevice cmdlet disables a Plug and Play (PnP) device. You must use an Administrator account to disable a device.





PARAMETERS

-CimSession [<CimSession[]>]

Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or

Get-CimSession cmdlet. The default is the current session on the local computer.



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-InformationAction [<System.Management.Automation.ActionPreference>]

Specifies how this cmdlet responds to an information event. The acceptable values for this parameter are:??



-- SilentlyContinue

-- Stop

-- Continue

-- Inquire

-- Ignore

-- Suspend



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-InformationVariable [<System.String>]

Specifies a variable in which to store an information event message.



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-InstanceId <String[]>

Specifies an array of unique instance IDs of devices.



Required? true

Position? 1

Default value none

Accept pipeline input? true(ByPropertyName)

Accept wildcard characters? false



-PassThru [<SwitchParameter>]

Indicates that this cmdlet returns a WMI error code. By default, this cmdlet does not return a value.



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-ThrottleLimit [<Int32>]

Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0 is

entered, then Windows PowerShell???? calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the

computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer.



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

Microsoft.Management.Infrastructure.CimInstance#ROOT/Cimv2/Win32_PnPEntity[]



The Microsoft.Management.Infrastructure.CimInstance object is a wrapper class that displays Windows Management Instrumentation (WMI) objects. The

path after the pound sign (#) provides the namespace and class name for the underlying WMI object.





OUTPUTS

System.Int32



This cmdlet generates a WMI error code.





NOTES





You must use an Administrator account for this cmdlet.



Example 1: Disable a device



PS C:\\>Disable-PnpDevice -InstanceId 'USB\\VID_5986&;PID_0266&;MI_00\\7&;1E5D3568&;0000'



This command disables a device that has the specified instance ID.







RELATED LINKS

Enable-PnpDevice

Get-PnpDevice