I am running following code:
System.Management.ManagementClass wmiNetAdapterConfiguration = new System.Management.ManagementClass(\"Win32_NetworkAdapterConf
The functionality provided by the System.Management namespace is dependent upon the WMI (Windows Management Instrumentation) service.
I suspect that the WMI service has not been started on the systems that are throwing that exception.
For troubleshooting purposes, you can verify that using the Administrative Tools → Services utility.
If this turns out to be the case, you can wrap the code in a try-catch block and use the ServiceController class to start and stop the appropriate service.