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.

Resource Properties

Property Name Description
Id Key property to uniquely identify the resource instance.
Name Name of the network adapter.
DisplayName Display Name of the advanced property.
DisplayValue Value to be set on the advanced property.
Ensure Specifies if the property needs to be configured (present) or reset to its default value (absent).

The display name of a network adapter advanced property 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.

This resource will eventually be made a part of NetworkingDsc in the official DSC resource kit. Stay tuned.

About the author: Ravikanth C

Ravikanth is the founder and editor of the PowerShell Magazine. He is also a PowerShell MVP who works at Dell Inc. He blogs at and you can follow him on Twitter @ravikanth.

Related Posts