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...
ArthurRodriguez
Jan 17, 2026Copper Contributor
Use the PowerShell command
Get-PnpDevice -Class Ports | Where-Object {$_.FriendlyName -like ‘*COM*’} | Disable-PnpDevice -Confirm:$false
to uninstall COM ports.