Forum Discussion
Rickenx
Jun 28, 2022Copper Contributor
Is there a script to uninstall COM ports?
I would like to know if there is a script that can be used to uninstall COM port, because sometimes the port loses communication and I need to uninstall and restart the computer manually. Would it be possible to use this script in powershell with the task scheduling feature?
1 Reply
- ArthurRodriguezCopper Contributor
Use the PowerShell command
Get-PnpDevice -Class Ports | Where-Object {$_.FriendlyName -like ‘*COM*’} | Disable-PnpDevice -Confirm:$false
to uninstall COM ports.