How can I use PowerShell to Remove "Ghost" (Old Hidden) VMware Network Adapters in Windows 7?

We recently upgrade the virtual hardware of some of our VMware VM's running Windows 7. One side-effect is that in Windows on these machines, an instance of the NIC from the previous version of virtual hardware remains, as a hidden
device. This can be easily found manually on a machine by enabling Device manager to show hidden devices (registry and a menu option - View...Show Hidden Devices). You can then just right-click on the device in question and uninstall.
The problem here, like in so many other tasks, is that you may have multiple instances, on multiple machines. We had just that, and in scouring the internet for a PowerShell only script to resolve the issue, I could not find one. Therefore, I've written
my own.
This exact script is only seeking out VMware "VMXNET3" nic cards, but could be easily adapted to find Ghost NIC's for a different vendor using my example. There are also some commented lines left in to aid you as an example of how you can
test the various queries in your own environment, on a test machine, before a full-blown deployment. 
NOTE: Please try this out (at your own risk - I am not responsible for how this works out for you), and please vote for my answer to this dilemma if this helped you. I'd appreciate it after all of the sweat the script took to crank out.
Thanks!
P.S. This script, of course, requires that Powershell is installed and enabled on the target computer. It then must be run as System - In our environment it is being remotely pushed through a software delivery systems, which runs this scrpt
as system.
THE SCRIPT:
CLS
#Querying WMI for Ghost NICs and Returning Criteria...
 Write-Host "VMware Ghost NIC Remover" -Foreground GREEN
 Write-Host "Author: Octavio Serpa AKA Octavio-Admin"
 Write-Host "Copyright Octavio Serpa - Octavio-Admin - 2014"
 Write-Host ""
 Write-Host "Checking Powershell Version" -Foreground Yellow
 $host.version
 Write-Host ""
 Write-Host "Searching for Ghost NIC's" -Foreground Yellow
 $Ghosts = gwmi win32_NetworkAdapter | ?{$_.Description -like "vm*" -and $_.Installed -like "True" -and $_.MACAddress -eq $null}
 $Ghosts | Select-Object Name,DeviceID
 If ($Ghosts -NE $NULL)
  Write-Host "One or more ghost NIC'S do exist on this machine. Script will continue..." -foreground RED
  Write-Host ""    
  else
  Write-Host "No ghost NIC's Found :) - Exiting..." -Foreground Green
  Write-Host ""    
  EXIT 0
#Using Criteria to Obtain the GUID of each Ghost NIC
 Write-Host "Getting NIC Variables" -Foreground Yellow
 foreach ($_ in $Ghosts) {
  $DID = $_.DeviceID
  If ($DID -NE $NULL)
  Write-Host "The NIC DID: $DID"
  else
  Write-Host "$DID is NULL - Exiting..."
  EXIT 666
  if($DID -NOTLIKE "1*")
   Write-Host "Adding additional 0 to registry lookup since the DID is just one character..." - foreground yellow
   Write-Host "" 
   $NICREG = Get-ItemProperty "hklm:\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\000$DID"
  ELSE
   $NICREG = Get-ItemProperty "hklm:\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\00$DID"
  $GUID = $NICREG.NetCfgInstanceId
  Write-Host "The NIC GUID: $GUID"
                $PNPDID = $NICREG.DeviceInstanceID
  $PNPDID = $PNPDID.Trimstart("PCI\VEN_15AD&DEV_07B0&SUBSYS_07B015AD&REV_01\")
  Write-Host "The truncated PNPDevice ID is $PNPDID"
  Write-Host ""
  Write-Host "Searching for Registry Keys that match NIC GUID: $GUID" -Foreground Yellow
  $NICREGPATH = @(1..50)
  foreach ($_ in $NICREGPATH)
   $TESTREG = Test-Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\$_" -Verbose
   if($TESTREG -EQ $FALSE)
    #Write-Host ""
    #Write-Host "FALSE: HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\$_ DOES NOT EXIST" -Foreground RED     
    ELSE
    #Write-Host "True - NIC $_ Exists" -Foreground Green
    $NICID = $_    
    $SubPath1 = 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\'+$NICID
    #Write-Host "The Sub-Key Path To Query = $SubPath1"
    $SubPath2 = 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\NetworkCards\'+$NICID
    #Write-Host "The Sub-Key Path To Query = $SubPath2"
    $NICProperties = Get-ItemProperty $SubPath1
    #$NICProperties
    $Match = $NICProperties.ServiceName    
    #$Match
    foreach ($_ in $Match) {
    #Write-Host "The NIC GUID found in this registry key is: $_" -Foreground Yellow
    #Write-Host ""
    if($_ -NE $GUID)
    #Write-Host "NO MATCH - THIS NIC HAS NOT BEEN TOUCHED" -Foreground GREEN
                                #Write-Host ""
    ELSE
    Write-Host "MATCH - Registry Entries for this NIC will be DELETED" -Foreground RED
    Remove-Item $SubPath1 -Recurse  -ErrorAction SilentlyContinue
    Remove-Item $SubPath2 -Recurse  -ErrorAction SilentlyContinue
    $CCS = @("ControlSet001", "ControlSet002")
    foreach ($_ in $CCS) {
     $CCS = $_
     $reg1 = 'HKLM:\SYSTEM\' + $CCS + '\Services\'+$GUID
     Remove-Item $reg1 -Recurse  -ErrorAction SilentlyContinue -verbose 
     $reg1 = 'HKLM:\SYSTEM\' + $CCS + '\Services\Tcpip\Parameters\Adapters\'+$GUID
     Remove-Item $reg1 -Recurse  -ErrorAction SilentlyContinue -verbose
     $reg1 = 'HKLM:\SYSTEM\' + $CCS + '\Control\DeviceClasses\{ad498944-762f-11d0-8dcb-00c04fc3358c}\##?#PCI#VEN_15AD&DEV_07B0&SUBSYS_07B015AD&REV_01#$PNPDID#{ad498944-762f-11d0-8dcb-00c04fc3358c}\#'+$GUID
     Remove-Item $reg1 -Recurse  -ErrorAction SilentlyContinue -verbose
     $reg1 = 'HKLM:\SYSTEM\' + $CCS + '\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}\'+$GUID
     Remove-Item $reg1 -Recurse  -ErrorAction SilentlyContinue -verbose
     $reg1 = 'HKLM:\SYSTEM\' + $CCS + '\services\JNPRNA\Parameters\Adapters\' + $GUID
     Remove-Item $reg1 -Recurse  -ErrorAction SilentlyContinue -verbose
     $reg1 = 'HKLM:\SYSTEM\' + $CCS + '\services\NetBT\Parameters\Interfaces\Tcpip_' + $GUID
     Remove-Item $reg1 -Recurse  -ErrorAction SilentlyContinue -verbose
     $reg1 = 'HKLM:\SYSTEM\' + $CCS + '\services\Psched\Parameters\NdisAdapters\' + $GUID
     Remove-Item $reg1 -Recurse  -ErrorAction SilentlyContinue -verbose
     $reg1 = 'HKLM:\SYSTEM\' + $CCS + '\services\Tcpip\Parameters\Adapters\' + $GUID
     Remove-Item $reg1 -Recurse  -ErrorAction SilentlyContinue -verbose
     $reg1 = 'HKLM:\SYSTEM\' + $CCS + '\services\Tcpip\Parameters\DNSRegisteredAdapters\' + $GUID
     Remove-Item $reg1 -Recurse  -ErrorAction SilentlyContinue -verbose
     $reg1 = 'HKLM:\SYSTEM\' + $CCS + '\services\Tcpip\Parameters\Interfaces\' + $GUID
     Remove-Item $reg1 -Recurse  -ErrorAction SilentlyContinue -verbose
     $reg1 = 'HKLM:\SYSTEM\' + $CCS + '\services\WfpLwf\Parameters\NdisAdapters\' + $GUID
     Remove-Item $reg1 -Recurse  -ErrorAction SilentlyContinue -verbose
                                         if($DID -NOTLIKE
"1*")
              $reg1 = 'HKLM:\SYSTEM\' + $CCS + '\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\000' + $DID
                         Remove-Item $reg1 -Recurse  -ErrorAction SilentlyContinue -verbose
       ELSE
       $reg1 = 'HKLM:\SYSTEM\' + $CCS + '\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\00' + $DID
       Remove-Item $reg1 -Recurse  -ErrorAction SilentlyContinue -verbose
     $reg1 = 'HKLM:\SYSTEM\' + $CCS + '\Enum\PCI\VEN_15AD&DEV_07B0&SUBSYS_07B015AD&REV_01\' + $PNPDID
     Remove-Item $reg1 -Recurse  -ErrorAction SilentlyContinue -verbose
#This is our Success check at the end
 Write-Host ""
 Write-Host "Searching for any remaining Ghost NICs:" -Foreground Yellow
          $Ghosts = gwmi win32_NetworkAdapter | ?{$_.Description -like "vm*" -and $_.Installed -like "True" -and $_.MACAddress -eq $null}
 $Ghosts | Select-Object Name,DeviceID
  If ($Ghosts -NE $NULL)
  Write-Host "There is still at least one ghost NIC present. The remover script may not be functioning correctly. Please contact Octavio-Admin on Microsoft Technet Forums with any questions" -foreground RED
  Write-Host ""
  EXIT 666
  else
  Write-Host "No ghost NIC's Found :) - Exiting..." -Foreground Green
  Write-Host ""    
  EXIT 0

THE SCRIPT:
CLS
#Querying WMI for Ghost NICs and Returning Criteria...
Write-Host "VMware Ghost NIC Remover" -Foreground GREEN
Write-Host "Author: Octavio Serpa AKA Octavio-Admin"
Write-Host "Copyright Octavio Serpa - Octavio-Admin - 2014"
Write-Host ""
Write-Host "Checking Powershell Version" -Foreground Yellow
$host.version
Write-Host ""
Write-Host "Searching for Ghost NIC's" -Foreground Yellow
$Ghosts = gwmi win32_NetworkAdapter | ?{$_.Description -like "vm*" -and $_.Installed -like "True" -and $_.MACAddress -eq $null}
$Ghosts | Select-Object Name,DeviceID
If ($Ghosts -NE $NULL)
  Write-Host "One or more ghost NIC'S do exist on this machine. Script will continue..." -foreground RED
  Write-Host ""   
  else
  Write-Host "No ghost NIC's Found :) - Exiting..." -Foreground Green
  Write-Host ""   
  EXIT 0
#Using Criteria to Obtain the GUID of each Ghost NIC
Write-Host "Getting NIC Variables" -Foreground Yellow
foreach ($_ in $Ghosts) {
  $DID = $_.DeviceID
  If ($DID -NE $NULL)
  Write-Host "The NIC DID: $DID"
  else
  Write-Host "$DID is NULL - Exiting..."
  EXIT 666
  if($DID -NOTLIKE "1*")
   Write-Host "Adding additional 0 to registry lookup since the DID is just one character..." - foreground yellow
   Write-Host ""
   $NICREG = Get-ItemProperty "hklm:\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\000$DID"
  ELSE
   $NICREG = Get-ItemProperty "hklm:\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\00$DID"
  $GUID = $NICREG.NetCfgInstanceId
  Write-Host "The NIC GUID: $GUID"
                $PNPDID = $NICREG.DeviceInstanceID
  $PNPDID = $PNPDID.Trimstart("PCI\VEN_15AD&DEV_07B0&SUBSYS_07B015AD&REV_01\")
  Write-Host "The truncated PNPDevice ID is $PNPDID"
  Write-Host ""
  Write-Host "Searching for Registry Keys that match NIC GUID: $GUID" -Foreground Yellow
  $NICREGPATH = @(1..50)
  foreach ($_ in $NICREGPATH)
   $TESTREG = Test-Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\$_" -Verbose
   if($TESTREG -EQ $FALSE)
    #Write-Host ""
    #Write-Host "FALSE: HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\$_ DOES NOT EXIST" -Foreground RED    
    ELSE
    #Write-Host "True - NIC $_ Exists" -Foreground Green
    $NICID = $_   
    $SubPath1 = 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\'+$NICID
    #Write-Host "The Sub-Key Path To Query = $SubPath1"
    $SubPath2 = 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\NetworkCards\'+$NICID
    #Write-Host "The Sub-Key Path To Query = $SubPath2"
    $NICProperties = Get-ItemProperty $SubPath1
    #$NICProperties
    $Match = $NICProperties.ServiceName   
    #$Match
    foreach ($_ in $Match) {
    #Write-Host "The NIC GUID found in this registry key is: $_" -Foreground Yellow
    #Write-Host ""
    if($_ -NE $GUID)
    #Write-Host "NO MATCH - THIS NIC HAS NOT BEEN TOUCHED" -Foreground GREEN
                                #Write-Host ""
    ELSE
    Write-Host "MATCH - Registry Entries for this NIC will be DELETED" -Foreground RED
    Remove-Item $SubPath1 -Recurse  -ErrorAction SilentlyContinue
    Remove-Item $SubPath2 -Recurse  -ErrorAction SilentlyContinue
    $CCS = @("ControlSet001", "ControlSet002")
    foreach ($_ in $CCS) {
     $CCS = $_
     $reg1 = 'HKLM:\SYSTEM\' + $CCS + '\Services\'+$GUID
     Remove-Item $reg1 -Recurse  -ErrorAction SilentlyContinue -verbose
     $reg1 = 'HKLM:\SYSTEM\' + $CCS + '\Services\Tcpip\Parameters\Adapters\'+$GUID
     Remove-Item $reg1 -Recurse  -ErrorAction SilentlyContinue -verbose
     $reg1 = 'HKLM:\SYSTEM\' + $CCS + '\Control\DeviceClasses\{ad498944-762f-11d0-8dcb-00c04fc3358c}\##?#PCI#VEN_15AD&DEV_07B0&SUBSYS_07B015AD&REV_01#$PNPDID#{ad498944-762f-11d0-8dcb-00c04fc3358c}\#'+$GUID
     Remove-Item $reg1 -Recurse  -ErrorAction SilentlyContinue -verbose
     $reg1 = 'HKLM:\SYSTEM\' + $CCS + '\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}\'+$GUID
     Remove-Item $reg1 -Recurse  -ErrorAction SilentlyContinue -verbose
     $reg1 = 'HKLM:\SYSTEM\' + $CCS + '\services\JNPRNA\Parameters\Adapters\' + $GUID
     Remove-Item $reg1 -Recurse  -ErrorAction SilentlyContinue -verbose
     $reg1 = 'HKLM:\SYSTEM\' + $CCS + '\services\NetBT\Parameters\Interfaces\Tcpip_' + $GUID
     Remove-Item $reg1 -Recurse  -ErrorAction SilentlyContinue -verbose
     $reg1 = 'HKLM:\SYSTEM\' + $CCS + '\services\Psched\Parameters\NdisAdapters\' + $GUID
     Remove-Item $reg1 -Recurse  -ErrorAction SilentlyContinue -verbose
     $reg1 = 'HKLM:\SYSTEM\' + $CCS + '\services\Tcpip\Parameters\Adapters\' + $GUID
     Remove-Item $reg1 -Recurse  -ErrorAction SilentlyContinue -verbose
     $reg1 = 'HKLM:\SYSTEM\' + $CCS + '\services\Tcpip\Parameters\DNSRegisteredAdapters\' + $GUID
     Remove-Item $reg1 -Recurse  -ErrorAction SilentlyContinue -verbose
     $reg1 = 'HKLM:\SYSTEM\' + $CCS + '\services\Tcpip\Parameters\Interfaces\' + $GUID
     Remove-Item $reg1 -Recurse  -ErrorAction SilentlyContinue -verbose
     $reg1 = 'HKLM:\SYSTEM\' + $CCS + '\services\WfpLwf\Parameters\NdisAdapters\' + $GUID
     Remove-Item $reg1 -Recurse  -ErrorAction SilentlyContinue -verbose
                                         if($DID -NOTLIKE
"1*")
              $reg1 = 'HKLM:\SYSTEM\' + $CCS + '\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\000' + $DID
                         Remove-Item $reg1 -Recurse  -ErrorAction SilentlyContinue -verbose
       ELSE
       $reg1 = 'HKLM:\SYSTEM\' + $CCS + '\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\00' + $DID
       Remove-Item $reg1 -Recurse  -ErrorAction SilentlyContinue -verbose
     $reg1 = 'HKLM:\SYSTEM\' + $CCS + '\Enum\PCI\VEN_15AD&DEV_07B0&SUBSYS_07B015AD&REV_01\' + $PNPDID
     Remove-Item $reg1 -Recurse  -ErrorAction SilentlyContinue -verbose
#This is our Success check at the end
Write-Host ""
Write-Host "Searching for any remaining Ghost NICs:" -Foreground Yellow
          $Ghosts = gwmi win32_NetworkAdapter | ?{$_.Description -like "vm*" -and $_.Installed -like "True" -and $_.MACAddress -eq $null}
$Ghosts | Select-Object Name,DeviceID
  If ($Ghosts -NE $NULL)
Write-Host "There is still at least one ghost NIC present. The remover script may not be functioning correctly. Please contact Octavio-Admin on Microsoft Technet Forums with any questions" -foreground RED
  Write-Host ""
  EXIT 666
  else
  Write-Host "No ghost NIC's Found :) - Exiting..." -Foreground Green
  Write-Host ""   
  EXIT 0
Hello Octavio,
I'm having similar issues with azure VMs (windows server 2008 and 2012). I noticed that the name of the network adapter changes every time the servers are turned off and then on.
For example every time I perform that action on each VM, the network adapter became to "Microsoft Hyper-V Network Adapter #3" (and then #4, #5, etc).
I found in to many forums that to resolve that is needed to remove Hidden (Ghost) Network Adapters and most of the people is doing that manually from the device manager (right click on the hidden network adapter and select uninstall).
Then I found this script created by you and made some changes to find Description -like "Microsoft Hyper-V Network*".
It seems to find the adapters and also remove them (based on the script results). But if I go to the device manager after restarting the server, all hidden (ghost) adapters are still there (for example Microsoft Hyper-V Network Adapter
#2, Microsoft Hyper-V Network Adapter #3, Microsoft Hyper-V Network Adapter #4, Microsoft Hyper-V Network Adapter #n).
The only thing I noticed after running the script is that, in the Control Panel -> Network and Sharing Center, the name of the adapter has no # (Now is shown as “Ethernet” and before as “Ethernet #”)
This is my script, could you please take a look and tell me if there is something wrong o missing?
CLS
#Querying WMI for Ghost NICs and Returning Criteria...
Write-Host "VMware Ghost NIC Remover" -Foreground GREEN
Write-Host "Author: Octavio Serpa AKA Octavio-Admin"
Write-Host "Copyright Octavio Serpa - Octavio-Admin - 2014"
Write-Host ""
Write-Host "Checking Powershell Version" -Foreground Yellow
$host.version
Write-Host ""
Write-Host "Searching for Ghost NIC's" -Foreground Yellow
$Ghosts = gwmi win32_NetworkAdapter | ?{$_.Description -like "Microsoft Hyper-V Network*" -and $_.Installed -like "True" -and $_.MACAddress -eq $null}
$Ghosts | Select-Object Name,DeviceID
If ($Ghosts -NE $NULL)
  Write-Host "One or more ghost NIC'S do exist on this machine. Script will continue..." -foreground RED
  Write-Host ""    
  else
  Write-Host "No ghost NIC's Found :) - Exiting..." -Foreground Green
  Write-Host ""    
  EXIT 0
#Using Criteria to Obtain the GUID of each Ghost NIC
Write-Host "Getting NIC Variables" -Foreground Yellow
foreach ($_ in $Ghosts) {
  $DID = $_.DeviceID
  If ($DID -NE $NULL)
  Write-Host "The NIC DID: $DID"
  else
  Write-Host "$DID is NULL - Exiting..."
  EXIT 666
  if($DID -NOTLIKE "1*")
   Write-Host "Adding additional 0 to registry lookup since the DID is just one character..." - foreground yellow
   Write-Host "" 
   $NICREG = Get-ItemProperty "hklm:\SYSTEM\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}\000$DID"
  ELSE
   $NICREG = Get-ItemProperty "hklm:\SYSTEM\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}\00$DID"
  $GUID = $NICREG.NetCfgInstanceId
  Write-Host "The NIC GUID: $GUID"
                $PNPDID = $NICREG.DeviceInstanceID
  $PNPDID = $PNPDID.Trimstart("PCI\VEN_15AD&DEV_07B0&SUBSYS_07B015AD&REV_01\")
  Write-Host "The truncated PNPDevice ID is $PNPDID"
  Write-Host ""
  Write-Host "Searching for Registry Keys that match NIC GUID: $GUID" -Foreground Yellow
  $NICREGPATH = @(1..50)
  foreach ($_ in $NICREGPATH)
   $TESTREG = Test-Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\$_" -Verbose
   if($TESTREG -EQ $FALSE)
    #Write-Host ""
    #Write-Host "FALSE: HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\$_ DOES NOT EXIST" -Foreground RED     
    ELSE
    #Write-Host "True - NIC $_ Exists" -Foreground Green
    $NICID = $_   
    $SubPath1 = 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\'+$NICID
    #Write-Host "The Sub-Key Path To Query = $SubPath1"
    $SubPath2 = 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\NetworkCards\'+$NICID
    #Write-Host "The Sub-Key Path To Query = $SubPath2"
    $NICProperties = Get-ItemProperty $SubPath1
    #$NICProperties
    $Match = $NICProperties.ServiceName    
    #$Match
    foreach ($_ in $Match) {
    #Write-Host "The NIC GUID found in this registry key is: $_" -Foreground Yellow
    #Write-Host ""
    if($_ -NE $GUID)
    #Write-Host "NO MATCH - THIS NIC HAS NOT BEEN TOUCHED" -Foreground GREEN
                                #Write-Host ""
    ELSE
    Write-Host "MATCH - Registry Entries for this NIC will be DELETED" -Foreground RED
    Remove-Item $SubPath1 -Recurse  -ErrorAction SilentlyContinue
    Remove-Item $SubPath2 -Recurse  -ErrorAction SilentlyContinue
    $CCS = @("ControlSet001", "ControlSet002")
    foreach ($_ in $CCS) {
     $CCS = $_
     $reg1 = 'HKLM:\SYSTEM\' + $CCS + '\Services\'+$GUID
     Remove-Item $reg1 -Recurse  -ErrorAction SilentlyContinue -verbose 
     $reg1 = 'HKLM:\SYSTEM\' + $CCS + '\Services\Tcpip\Parameters\Adapters\'+$GUID
     Remove-Item $reg1 -Recurse  -ErrorAction SilentlyContinue -verbose
     $reg1 = 'HKLM:\SYSTEM\' + $CCS + '\Control\DeviceClasses\{ad498944-762f-11d0-8dcb-00c04fc3358c}\##?#PCI#VEN_15AD&DEV_07B0&SUBSYS_07B015AD&REV_01#$PNPDID#{ad498944-762f-11d0-8dcb-00c04fc3358c}\#'+$GUID
     Remove-Item $reg1 -Recurse  -ErrorAction SilentlyContinue -verbose
     $reg1 = 'HKLM:\SYSTEM\' + $CCS + '\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}\'+$GUID
     Remove-Item $reg1 -Recurse  -ErrorAction SilentlyContinue -verbose
     $reg1 = 'HKLM:\SYSTEM\' + $CCS + '\services\JNPRNA\Parameters\Adapters\' + $GUID
     Remove-Item $reg1 -Recurse  -ErrorAction SilentlyContinue -verbose
     $reg1 = 'HKLM:\SYSTEM\' + $CCS + '\services\NetBT\Parameters\Interfaces\Tcpip_' + $GUID
     Remove-Item $reg1 -Recurse  -ErrorAction SilentlyContinue -verbose
     $reg1 = 'HKLM:\SYSTEM\' + $CCS + '\services\Psched\Parameters\NdisAdapters\' + $GUID
     Remove-Item $reg1 -Recurse  -ErrorAction SilentlyContinue -verbose
     $reg1 = 'HKLM:\SYSTEM\' + $CCS + '\services\Tcpip\Parameters\Adapters\' + $GUID
     Remove-Item $reg1 -Recurse  -ErrorAction SilentlyContinue -verbose
     $reg1 = 'HKLM:\SYSTEM\' + $CCS + '\services\Tcpip\Parameters\DNSRegisteredAdapters\' + $GUID
     Remove-Item $reg1 -Recurse  -ErrorAction SilentlyContinue -verbose
     $reg1 = 'HKLM:\SYSTEM\' + $CCS + '\services\Tcpip\Parameters\Interfaces\' + $GUID
     Remove-Item $reg1 -Recurse  -ErrorAction SilentlyContinue -verbose
     $reg1 = 'HKLM:\SYSTEM\' + $CCS + '\services\WfpLwf\Parameters\NdisAdapters\' + $GUID
     Remove-Item $reg1 -Recurse  -ErrorAction SilentlyContinue -verbose
                                         if($DID -NOTLIKE "1*")
              $reg1 = 'HKLM:\SYSTEM\' + $CCS + '\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\000' + $DID
                         Remove-Item $reg1 -Recurse  -ErrorAction SilentlyContinue -verbose
       ELSE
       $reg1 = 'HKLM:\SYSTEM\' + $CCS + '\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\00' + $DID
       Remove-Item $reg1 -Recurse  -ErrorAction SilentlyContinue -verbose
     $reg1 = 'HKLM:\SYSTEM\' + $CCS + '\Enum\PCI\VEN_15AD&DEV_07B0&SUBSYS_07B015AD&REV_01\' + $PNPDID
     Remove-Item $reg1 -Recurse  -ErrorAction SilentlyContinue -verbose
#This is our Success check at the end
Write-Host ""
Write-Host "Searching for any remaining Ghost NICs:" -Foreground Yellow
          $Ghosts = gwmi win32_NetworkAdapter | ?{$_.Description -like "Microsoft Hyper-V Network*" -and $_.Installed -like "True" -and $_.MACAddress -eq $null}
$Ghosts | Select-Object Name,DeviceID
  If ($Ghosts -NE $NULL)
Write-Host "There is still at least one ghost NIC present. The remover script may not be functioning correctly. Please contact Octavio-Admin on Microsoft Technet Forums with any questions" -foreground RED
  Write-Host ""
  EXIT 666
  else
  Write-Host "No ghost NIC's Found :) - Exiting..." -Foreground Green
  Write-Host ""    
  EXIT 0

Similar Messages

  • How can I sign out or remove the old apple ID in app store's updates?

    I created a new apple id and signed in the app store. When I update my apps, it requires me to sign in with my old apple id, and I cannot sign out my old id. How can I sign out or remove the old id in app store's updates?

    Delete those applications and then download them from the new Apple ID. This may require repurchasing them.
    (100330)

  • How can I use the speakers from my old iMac (with miniRCA? plug) on a new iMac

    How can I use the speakers (M-Audio) from my old 24" iMac on a new 27" iMac?  There is no jack on the new iMac - is there an adapter that will use the mini-RCA (?) plug from my old speakers to connect them to a new iMac?  Thanks ...

    Thanks again!
    Hmmm ... I wonder.  The input jack for external speakers quit working on my old iMac (it made lotsa static noise for a while when I moved the plug or computer, then quit working completely; I figure something inside the computer got loose or crapped out - and I'm too cheap/lazy to take it the 20 miles to the nearest shop that might fix it).  When I plug the speakers into the headphone jack on the old iMac, I get very low volume or just one channel.
    I don't have the new iMac yet, but I was hoping to use these old speakers instead of buying new ones.  I will certainly try your solution - what do I have to lose?  If they don't work, then I get new ones - or try something else.
    Many thanks for your time!

  • How can I use PowerShell 3.0 cmdlets or script to list all the local groups and local users of a server?

    Using PowerShell 3.0 (And if possible the CIM, not WMI cmdlet), how can I script with | out-file C:\<filename>.txt or .csv option to list all local user accounts & local groups
    on remote computers? 
    Thank You!

    I don't recall PowerShell V3 introducing anything new to handle local users and groups. You need to use PowerShell V1 methods, using the [ADSI] accelerator and the WinNT: provider. The scripts linked above show this. No need to use WMI (which would probably
    be slower).
    Here is a script I've used to enumerate all local groups and their members:
    $Computer
    = "MyServer"
    $Computer =
    [ADSI]"WinNT://$Computer"
    $Groups =
    $Computer.psbase.Children | Where {$_.psbase.schemaClassName
    -eq "group"}
    ForEach ($Group
    In $Groups)
        "Group: "
    + $Group.Name
        $Members
    = @($Group.psbase.Invoke("Members"))
        ForEach ($Member
    In $Members)
            $Class
    = $Member.GetType().InvokeMember("Class",
    'GetProperty', $Null,
    $Member, $Null)
            $Name
    = $Member.GetType().InvokeMember("Name",
    'GetProperty', $Null,
    $Member, $Null)
            "-- Member: $Name ($Class)"
    A similar script to enumerate all local users would be:
    $Computer
    = "MyServer"
    $Computer =
    [ADSI]"WinNT://$Computer"
    $Users =
    $Computer.psbase.Children | Where {$_.psbase.schemaClassName
    -eq "user"}
    ForEach ($User
    In $Users)
        "User: "
    + $User.Name
    Richard Mueller - MVP Directory Services

  • How can I use new apps on an old macbook?

    Hi all.
    I've been using macs since September now, and there are a number of things I've found infuriating about working on my Macbook...
    My Macbook is an old, mid 2007 model, Version 10.6.8, with a 2.16Ghz Intel Core 2 Duo Processor and 4GB.
    Unfortunately, this model of Macbook will not update to any later version.  This means there are a lot of apps I cannot use on it.
    I'm a filmmaking student, so editing is a huge part of my course. When downloading the newest version of any editing software (such as Premiere Pro or Avid Media Composer), the Macbook will simply refuse to install it, because it requires a newer version of OS X. This is just one example of the many things I cannot do due to the OS X version on here.
    How can I get around using newer apps such as Premiere Pro with version 10.6.8? Baring in mind I'm a student so I cannot afford to spend money on a new hard drive or anything.
    Also, if I have bought various games on Steam, but some of them are seemingly only playable on PC, can anyone tell me how I can get around playing those games on a Mac?
    Any help is greatly appreciated.
    Thank you in advance.
    Steve

    The Core2Duo MacBook (13-inch mid 2007) is rather dated, and to run a certain type
    of software on that model you'd have to get the version which was current when the
    computer model and the OS X versions it could run were prevailing. So an old version
    of something you need (used, new-old-stock, etc) may do the job for a time.
    Also, the Core2Duo series of early MacBook can run Lion 10.7.5 and that is about $20.
    as a download with code you buy from the Apple Store online. There are a few updates
    to the Lion version 10.7 once you went that far. Some older 10.6.8 capable applications
    for Intel based Macs would probably still work OK in 10.7.5, but none of the PPC coded
    third party applications would run without the Rosetta feature installed in Snow Leopard.
    According to MacTracker database, your old Core2Duo is one of those which can run
    Lion 10.7.5 at the latest, and a slight upgrade in RAM to 3GB total, is possible. Not sure
    if any advantage of using two 2-GB chips would be seen as functional in there, but that
    is an easy way to round off what is written as the higher supported amount of RAM. With
    two of the 2 GB chips. Otherwise: one - 1 GB +  one - 2 GB = 3GB lists as total.
    A good repaired MacBook or MacBook Pro of earlier vintage isn't very expensive; some
    companies offer the versions older than those available at the Apple Store refurbished
    page, that still may be capable, yet not run the latest applications. And several of them
    probably should not run Yosemite since their hardware may be marginal. Models that
    cannot have their hardware upgraded to run a later OS X, should not be chanced.
    Sites such as macsales.com sometimes offer used Macs, wegenermedia.com has a
    few different models, since they repair computers and offer excess on their site. The
    powermax company has some. Not sure who actually repairs what they sell, with an
    exception to wegenermedia who does repair on-site and will accept repair orders.
    The everymac.com site is helpful in comparing various build year model specifications
    as is the downloadable database of update upgrade specs from http://mactracker.ca .
    So, you can upgrade past Snow Leopard 10.6.8, but that may or may not break other
    applications you may still be able to use from the preceding era of Mac software. Lion
    also would probably prefer more RAM than SL 10.6.8, so you're max-ed out there.
    The MacBook series has been discontinued for nearly 5 years (2006 to 2010) so their
    last model was among the better ones. MacBook/Pro 13-inch Late 2012 remains good
    since you could add RAM and possibly upgrade the hard disk drive. It's a non-retina.
    Hopefully you can find a deal on some good condition later model MacBook or Pro.
    Good luck & happy computing!

  • How can I use my iPhone from my old network on my new network

    Can I use my old phone that was on contract with movie star with my orange SIM card

    Contact Moviestar to see if they offer unlocking and if you qualify.
    Only the wireless carrier to which the iPhone is locked can unlock it.

  • How can I use Powershell to "Complete dhcp configuration" ?

    I installed the DHCP Server feature with Powershell and now I'm wondering how to "Complete dhcp configuration" also with Powershell?
    Here's what I did (example):
    Install-WindowsFeature DHCP -IncludeManagementTools
    Add-DhcpServerv4Scope -name "Corpnet" -StartRange 10.0.0.100 -EndRange 10.0.0.200
    -SubnetMask 255.255.255.0
    Set-DhcpServerv4OptionValue -DnsDomain corp.contoso.com -DnsServer 10.0.0.1
    Add-DhcpServerInDC -DnsName dc1.corp.contoso.com
    "Server Manager |> DHCP" now informs me that "Configuration required for DHCP Server at DC1" and by selecting "More" I can "Complete dhcp configuration". So, how do I complete the task with Powershell?
    Thanks!

    I installed the DHCP Server feature with Powershell and now I'm wondering how to "Complete dhcp configuration" also with Powershell?
    Here's what I did (example):
    Install-WindowsFeature DHCP -IncludeManagementTools
    Add-DhcpServerv4Scope -name "Corpnet" -StartRange 10.0.0.100 -EndRange
    10.0.0.200 -SubnetMask 255.255.255.0
    Set-DhcpServerv4OptionValue -DnsDomain corp.contoso.com -DnsServer 10.0.0.1
    Add-DhcpServerInDC -DnsName dc1.corp.contoso.com
    "Server Manager |> DHCP" now informs me that "Configuration required for DHCP Server at DC1" and by selecting "More" I can "Complete dhcp configuration". So, how do I complete the task with Powershell?
    Thanks!
    For a very belated answer, you need to set a registry value to tell it that the configuration has been completed.
    Set-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\ServerManager\Roles\12 -Name ConfigurationState -Value 2;
    Restart-Service DHCPServer;

  • How can I use an airport extreme to extend my wireless network?

    I have a Verizon FIOs router with both wireless and ethernet capability. I also have an airport extreme base station, which is currently connected to the Verizon router by Ethernet and provides wireless to a MacBook in a distant room upstairs. Practically, I have two wireless network now. I have two G4 Sawtooth, which do not have wireless PCI card and require ethernet connection for internet. One of them is in the upstairs study room and connected to the Verizon wireless router by Ethernet. The other is in an downstairs room has not wireless connection.
    Can I relocate the airport base station to downstairs and connect it to the Sawtooth there for receiving wireless from the Verizon router and broadcast further to its wireless network? If so, how do I set up the airport station downstairst? If not, I know that I have get a PCI wifi for the Sawtooth downstairs.
    Your advice is greatly appreciated.
    Robert

    Can I relocate the airport base station to downstairs and connect it to the Sawtooth there for receiving wireless from the Verizon router and broadcast further to its wireless network?
    Sorry but no the AirPort Extreme base station (AEBS) will not wirelessly connect to the network provided by the Verizon FiOS router.
    What you could do is get another AEBS, an AX, or a Time Capsule and place that downstairs. Then use that device to wirelessly connect to the wireless network provided by your current AEBS. If your current AEBS is not 802.11n capable then you would need to use WDS to make this happen. One bad thing about WDS is that each WDS link cuts your affective wireless bandwidth in half.

  • How can I use my 27" iMac (2010) as an additional display to my Windows 7 PC (target display mode)?

    So I have purchased a windows machines so that I can play all my favourite games on, and it's not so much a problem rather I have a 27" iMac that I would like to use as an additional monitor for said games.
    I have had a look at this article on using the iMac as a display for another computer and things looked promising. I think I need a bit of help getting there though as I can't find definitively anything online to tell me exactly what I need. Most stuff talks about connecting other Apple computers that have mini display ports.
    My PC's video card is an nVidia Geforce GTX 650 Ti that sports 2 DVI ports and a mini HDMI port (adaptor to full HDMI was included). The iMac has a mini display port. I went out and got a HDMI cable and Moshi Mini DisplayPort to HDMI Adapter (with audio) to try to use the iMac as the additional display. I connected the PC with [a generic] HDMI cable to the adaptor which ran to the iMac and went through the appropriate steps (ie. pressing CMD + F2) to initiate target display mode. Nothing happened.
    I have read that other people with different situations tried an SMC reset, but this didn't work for me either.
    At this stage I wanted to see if the DVI port would do anything, or perhaps looking at a particular kind of HDMI cable, but wanted to see what the community can offer up as advice.
    Any assistance would be greatly appreciated.
    Thank you.

    Hi,
    have a read here http://support.apple.com/kb/HT3924
    Regards
    Stefan

  • How can I use an Airport Express to join my wireless network and provide an internet signal to my Power Mac g5 via an ethernet cable?

    I have a power mac g5 that does not have a wireless card, and connects to the internet via ethernet cable.
    I want to know how to set up an airport express so that it joins my wireless home network and provides the G5 with an internet signal.
    This via an ethernet cable that is plugged  into the airport express and then into the ethernet port on the g5.
    Please advise as I have configured the airport express in every way possible, the green light is on and when I plug the ethernet cable into the G5 my network cofigurations shows nothing and says that the ethernet cable is not plugged in (It is).
    I get an internet signal if the ethernet cable is plugged directly into my wireless router, so the ethernet port works.
    Please assist. Thanks.

    Two requirements that must be met to do what you want.......
    1) An AirPort Express 802.11n must be used. Check the Model No on the label on the side of the Express. It needs to be A1264. Any other model number will not do what you want.
    2) The Express must be configured to "Join a wireless network" and the option to enable Ethernet Clients must be checked. 
    Open AirPort Utility and click Manual Setup
    Click the Wireless tab below the row of icons
    The box to "Allow Ethernet Clients" must be checked
    Please check to verify that your AirPort Express meets both requirements

  • How can I use back up from my old iPad  to my new one when one is iOS 8.1.3 and the new one is iOS 7.1.2. It not compatible on the screen of my new iPad

    I Had several problems with my old iPad so I have now been given a new one.i have made a back up on iCloud with my husbands iPad bit now it's telling me on the screen that there are no iCloud backups are compatible with the version of iOS 7.1.2 on this iPad my husband has iOS 8.1.3. Which I am trying to set up from.
    what do I do?
    kathryn.

    You can't restore to a backup that was taken on a device which has a higher version of iOS than on your iPad, you will have to update your iPad to 8.1.3 to be able to restore to it
    You should be able to update your iPad via Settings > General > Software Update

  • How  can I use my mac to covert old vhs tapes to electronic files

    I want to convert old home movies on VHS to electronic files I can store on my I mac??

    You need some kind of analog to digital converter. This typically has a video-in connector, and a Firewire or USB out. You could look into the Canopus ADVCmini.
    Matt

  • How can I use Microsoft Access on my Mac? Boot camp?

    How can I use Microsoft Access on my Mac? Boot camp?

    Running Windows or using a suite such as Libre Office. It is similar to Office 2007 for Windows, but runs on a Mac, and contains a database manage that is Access compatible.

  • I purchase Adobe Elements Photoshop 12 & Premiere 12 together from a camera shop in town.  When I tried to use the Premiere, it splashed "created with the trial verson" over all of the photos. How can this unsightly watermark be removed. It has severely h

    I purchased  Adobe Elements Photoshop 12 & Premiere 12 together from a camera shop in town.  When I tried to use the Premiere, it splashed "created with the trial version" over all of the photos. How can this unsightly watermark be removed. It has severely hampered my timeline to start and finish this project. Why would a purchase software product purport to be a "trial" version?

    This indicator will appear when you have not registered your product or typed in the serial number for the product.
    Once you've added the serial number, any future products will not display this indicator.
    To remove this this indicator from videos created before you added the serial number, you'll need to delete the rendered files.

  • How can I use photos in FCEHD?

    How can I use photos in FCEHD? (I'm new to the thing - done just one video project so far).
    When I imported photos from Aperture (first into the folder on desktop, and then from desktop to the Browser in FCEHD3.5, the photos have a black bar/a gray space above and below, and they appear too wide a bit on the right side, as if coming out of the Canvas'frame.
    Is it a way to fit them into the 4:3 format, so they fit the whole screen (BTW - what view I should have set for Viewer and Canvas? A 100% or "Fit The Screen" view?).
    Also: Is there a way to enter the same Transition in between all of my photos in the Timeline? (if so - how?)

    Re the Canvas window ... before exporting your sequence, rendering, etc it should be set to Fit to Window, this can avoid problems
    In FCE you can't set your own default transition. It is always the Cross Dissolve. If that is the one you want to use, when you drop your pics onto the timeline you can drag them over to Overwrite with Transition or hit Shift-F10. If you want to use multiple occurances of another trans, apply it once, double click to put it in the Viewer then just drop that down onto your clips
    I haven't used Aperture but I think that how they appear in the timeline depends upon the size they are created in. Search this forum, there is plenty of info about that. Generally Final Cut sizes the pics to fit into your video sequence. Put a pic in the timeline, click it, select Edit>Remove Attributes and from the submenu select Motion, see what happens

Maybe you are looking for

  • Too many id's need help setting up family sharing

    We currently have one apple id (tjc) that is associated with the apple store and one that is associated with itunes (m7).  The itunes one (m7) does not have an icloud account attached to it, used only for purchases from itunes store.  Husband uses th

  • Chapter 29 is missing from "The Java EE 6 Tutorial, Volume II"

    Chapter 29 is missing from "The Java EE 6 Tutorial, Volume II" This is all that is available (on a single page): Advanced Concepts in Java EE Security. This chapter provides more information on securing applications. Advanced Concepts in Java EE Secu

  • Oracle Text And Oracle Ultra search

    Hi all, I have a problem. I have some files in the server file system e.g C:/docs. I want to search these MS Office word files in order to see if they contain a word. I tried oracle ultra search but when i put File data source it provides a form file

  • How can I re-install my Adobe Creative Suite 6? Installation was idle when installing AdobeHelp

    I've problem re-install my Creative Suite 6 Master Collection for almost all applications. Installation was idle/stop when installing AdobeHelp, I've already tried to let the installation process ran for almost 24 hours, but it's still idle, so I can

  • $count parameter from an EntitySet

    Hallo everybody, today I spent the whole day to find a soution to get acces to the $count parameter from an existing SAP NetWeaver Gateway service and the associated entitySet. Up to now it doesn't work.... The $count parameter is reachable under fol