Using NetworkAdapterProperty #PSDSC Resource to Configure Network Adapter Advanced Properties
At times we need to set the physical adapter advanced properties such as VLAN ID. This can be done using the
Set-NetAdapterAdvancedProperty cmdlet. However, when using DSC-based configuration management, it makes sense to configure these advanced properties as well using DSC resource modules. Within the automation that I have been working on for automated deployments of Storage Spaces Direct clusters, I have the need for setting adapter advanced properties and that is what triggered me to write this new resource module — NetworkAdapterProperty. This is a part of the NetworkingDSC module.
This is not a fork of the xNetworking module. I am adding only the resources that I am developing from scratch to this NetworkingDsc. These resources will follow the HQRM guidelines.
This resource requires the display name of the network adapter and it can be seen by using the Get-NetAdapterAdvancedProperty cmdlet. Depending on what the network adapter driver implements, this list changes between different network adapter models/vendors. Let’s see a couple of examples of using this resource.
Configuring VLAN ID advanced property
The display name of the advanced property for VLAN configuration on physical adapter is usually VLAN ID.
Configuring DCBX Mode on Mellanox CX4 adapters
This following example is specific to Mellanox CX4 adapters. These adapters support firmware or host controlled DCB exchange. We can configure this by changing the value of DcbxMode property.