Skip to content

Instantly share code, notes, and snippets.

@vivek1986
Last active October 24, 2023 19:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vivek1986/8e1aa82664b752ead3f08e318d84887a to your computer and use it in GitHub Desktop.
Save vivek1986/8e1aa82664b752ead3f08e318d84887a to your computer and use it in GitHub Desktop.
How to Enable/Disable TouchPad PnpDevice when it becomes annoying to handle ?
  1. Open PowerShell in Admin Mode(Run As Administrator)
  2. Run following command to get List of All PnpDevices present in the OS/System:
Get-WmiObject Win32_PNPEntity | Select Name, DeviceID
  1. Run following command to filter the data-list and get the Device Info that you want to toggle:
Get-WmiObject Win32_PNPEntity | Select Name, DeviceID | Where Name -Match "HID"
Get-WmiObject Win32_PNPEntity | Select Name, DeviceID | Where Name -Match "HID" | Where Name -Match "mouse" | Where DeviceID -Match "ELAN"
  1. Copy the DeviceID value from the last aforementioned command and use it like below to Disable the device:
Disable-PnpDevice -InstanceId "HID\ELAN0625&COL01\5&14F74DC2&0&0000" -Confirm:$false

OR If your DeviceID value is else:

Disable-PnpDevice -InstanceId "<DeviceID>" -Confirm:$false
  1. Copy the DeviceID value from the last aforementioned command and use it like below to Enable the device:
Enable-PnpDevice -InstanceId "HID\ELAN0625&COL01\5&14F74DC2&0&0000" -Confirm:$false

OR If your DeviceID value is else:

Enable-PnpDevice -InstanceId "<DeviceID>" -Confirm:$false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment