- 1 year ago
Uninstall Device from powershell
To uninstall a device from PowerShell, you can use the pnputil
command-line utility, which is available in Windows. Here's an example of how you can uninstall a device using PowerShell:
powershell$deviceId = 'ENTER_DEVICE_ID_HERE'
# Uninstall the device using pnputil
& pnputil.exe /remove-device $deviceId
Replace ENTER_DEVICE_ID_HERE
with the actual Device ID of the device you want to uninstall. The Device ID can be obtained from the Device Manager or by using the Get-PnpDevice
cmdlet in PowerShell.
Save the PowerShell script with a .ps1
extension and run it using PowerShell.
Please note that uninstalling a device can have system-level impacts, so ensure that you are targeting the correct device and have appropriate permissions to perform the uninstallation. Carefully review the Device ID and understand the consequences before proceeding with the device uninstallation.