Werk #13348 · Oct 1, 21
windows_if.ps1: Use Get-NetAdapter if possible
Incompatible change. Existing setups may behave differently after upgrading. Review the details below before updating.
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.
Details
- Class:
- Bug Fixes
- Level:
- Trivial
- Component:
- Checks
- Versions:
- 2.1.0b1CommunityProUltimate + MT