Symptoms

When you scan a Windows machine you see the error


The Windows Machine Agent encountered an exception when 'Reading network adapters using PowerShell remoting'. The agent failed to read the section 'Network Adapters'. Error executing the command 'Get-NetAdapterDetails'. Cannot validate argument on parameter 'InterfaceAlias'. The argument is null. Provide a valid value for the argument, and then try running the command again.


Cause

This is caused when the network interface name has been removed from the registry.


Windows Server 2016 and above

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\NetworkSetup2\Interfaces\{identifier}\Kernel\IfAlias


Windows Server 2012 R2 (binary value)

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nsi\{guid}\index\value name



More Information

To find the adapter with the issue run the Get-NetAdapter cmdlet in PowerShell as an Administrator with the following parameters.

Get-NetAdapter -IncludeHidden | Where-Object -Property Name -EQ $null



Resolution

WARNING: Ensure you have a full system backup before making any changes to the system.


  • Using the interface description located in the command above execute the Rename-NetAdapter cmdlet in PowerShell as an Administrator with the following parameters.

    Rename-NetAdapter -InterfaceDescription "Microsoft Kernel Debug Network Adapter" -NewName "New Name" -IncludeHidden



    - or -

  • Remove the network adapter using Device Manager and re-add the adapter.

    - or -

  • Restore the system from a working backup.

    - or -

  • Set the Network Adapters optional component to "Do not scan" or "Scan (continue on failure)".