Uninstall hidden “Network Adapters” from Device Manager using PowerShell script

  • Thread starter ShridharKusurkar
  • Start date
S

ShridharKusurkar

Steps:

  1. Open Device Manager from Control Panel
  2. Select “Show hidden devices” from View menu
  3. Expand “Network adapters”
  4. Find hidden adapters

Manually these hidden adapters can be uninstall by below steps

  1. Right click on hidden adapter
  2. Click on uninstall.
  3. Click on Ok button.

How to uninstall these adapters using PowerShell script?

$Devs = Get-PnpDevice -Class net |
?
Status -eq Unknown |
Select FriendlyName, InstanceId

foreach ($Dev
in $Devs) {
Write-Host "Removing $($Dev.FriendlyName)" -ForegroundColor Cyan
$RemoveKey =
"HKLM:\SYSTEM\CurrentControlSet\Enum\$($Dev.InstanceId)"
Get-Item $RemoveKey |
Select-Object -ExpandProperty Property |
%{
Remove-ItemProperty -Path $RemoveKey -Name $_ -Verbose }
}
Write-Host "Done. Please restart!" -ForegroundColor Green

I have Administrator access still, this code throws error - Remove-ItemProperty : Requested registry access is not allowed.

Continue reading...
 
Back
Top Bottom