- Open PowerShell in Admin Mode(Run As Administrator)
- Run following command to get List of All PnpDevices present in the OS/System:
Get-WmiObject Win32_PNPEntity | Select Name, DeviceID
- 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"
- 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
- 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