Created
April 27, 2023 10:34
-
-
Save zeroxia/7eb9f9f36c032a8ec03b080c5fae595f to your computer and use it in GitHub Desktop.
Revisions
-
zeroxia created this gist
Apr 27, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ ## ## Some stupid application (like "鲜时光") in Android TV system advertises itself ## with different identities, causing Windows system assuming there are many many ## such software devices. ## You can open "Settings" app and select "Devices" to browse those devices. Or they ## are also listed in "Device Manager" under the category of "Software Devices". ## ## To remove them all together without manually right clicking each instance and ## selecting "Uninstall", here is a PowerShell script stolen from stackoverflow: ## ## https://stackoverflow.com/questions/60638900/uninstall-device-from-powershell ## ## Save this file as "remove_zombie_software_devices.ps1" and execute it with a ## privileged PowerShell terminal (i.e., run as Administrator). ## ## Remember to update the clause "$_.Name -Like "XXX"" in the following line to your ## target zombie device names. foreach ($dev in (Get-PnpDevice | Where-Object { $_.Name -Like "*我的鲜时光*" } )) { Write-Host 'Name: '$dev.Name' | InstanceId: '$dev.InstanceId &"pnputil" /remove-device $dev.InstanceId &"pnputil" /scan-devices }