Skip to content

[Issue] - Health Checker - Get-NetAdapter throws hidden errors causing the script to fail #2504

@dpaulson45

Description

@dpaulson45

Provide Version Number
Exchange Health Checker version 26.02.10.1756

Describe the issue
When running Get-NetAdapter we end up hitting a hidden error, a Write-Error that doesn't stop the cmdlet. This then ends up failing the job causing the entire script to fail.

Script Output

----Errors that occurred that wasn't handled----
[01/07/2026 13:17:09] : Error Index: 0
[01/07/2026 13:17:09] : 

----------------Error Information----------------
Error Origin Info: exchangeserver.contoso.com
Get-NetAdapter : A general error occurred that is not covered by a more specific error code.
Inner Exception: System.Management.Automation.RemoteException: A general error occurred that is not covered by a more specific error code.
Position Message: At C:\HealthChecker.ps1:11061 char:25
+ ...             $result = Receive-Job $jobInfo.Job -ErrorVariable "JobErr ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Remote Position Message: At C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\NetTCPIP\NetIPConfiguration.psm1:90 char:25
+ ...     $Adapters = Get-NetAdapter -IncludeHidden -CimSession $CimSession
+                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Script Stack: at Wait-JobQueue<Process>, C:\HealthChecker.ps1: line 11061
at Get-HealthCheckerDataCollection<Process>, C:\HealthChecker.ps1: line 11365
at Invoke-HealthCheckerMainReport, C:\HealthChecker.ps1: line 20241
at <ScriptBlock><End>, C:\HealthChecker.ps1: line 21137
at <ScriptBlock>, <No file>: line 1
-------------------------------------------------


----Errors that occurred that wasn't handled----
[02/11/2026 21:00:19] : Error Index: 0
[02/11/2026 21:00:19] : 

----------------Error Information----------------
Error Origin Info: exchangeServer.contoso.com
Get-NetAdapter : Invalid class 
Inner Exception: System.Management.Automation.RemoteException: Invalid class 
Position Message: At C:\HealthChecker.ps1:11065 char:25
+ ...             $result = Receive-Job $jobInfo.Job -ErrorVariable "JobErr ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Remote Position Message: At C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\NetTCPIP\NetIPConfiguration.psm1:90 char:25
+ ...     $Adapters = Get-NetAdapter -IncludeHidden -CimSession $CimSession
+                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Script Stack: at Wait-JobQueue<Process>, C:\HealthChecker.ps1: line 11065
at Get-HealthCheckerDataCollection<Process>, C:\HealthChecker.ps1: line 11369
at Invoke-HealthCheckerMainReport, C:\HealthChecker.ps1: line 20344
at <ScriptBlock><End>, C:\HealthChecker.ps1: line 21240
at <ScriptBlock>, <No file>: line 1
-------------------------------------------------

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions