Werk #13348: windows_if.ps1: Use Get-NetAdapter if possible

Komponente Checks & agents
Titel windows_if.ps1: Use Get-NetAdapter if possible
Datum 01.10.2021
Checkmk-Editon Checkmk Raw (CRE)
Checkmk-Version 2.1.0i1
Level Kleine Änderung
Klasse Bugfix
Kompatibilität Inkompatibel - Manuelle Interaktion könnte erforderlich sein

The Windows agent plugin windows_if.ps1, deployed via the bakery ruleset 'Network interfaces on Windows', collects additional data about network interfaces, such as aliasses and MAC addresses. Up to now, the plugin used Get-WmiObject Win32_NetworkAdapter to collect this information. However, Win32_NetworkAdapter is deprecated and might return wrong aliasses for certain network adapters.

Now, the plugin attempts to use Get-NetAdapter instead. If this is not available, it falls back to Win32_NetworkAdapter.

For most interfaces, this change should be compatible, since Win32_NetworkAdapter and Get-NetAdapter produce mostly identical output. However, as mentioned earlier, there might be interfaces for which e.g. the alias changes.

Zur Liste aller Werks