Modifying network adapter settings

I’m trying to modify multiple NIC properties in one go. So having a table of properties I’m interested in I pipe it to set-netAdapterBinding in this case

Get-NetAdapterBinding E*1).Enable gives me which ComponentID is anabled for a particular adapter and which is not. So then I try
@(“ms_tcpip6”,“ms_pacer”) | foreach-object {(Set-NetAdapterBinding}.Enabled = $false

Obviously it doesn’t work but I’m not sure why? Could someone help please?

Hi Jarek,

Please try below:

Get-NetAdapterBinding -Name E* -ComponentID 'ms_tcpip6','ms_pacer' | ForEach-Object {
    if (-not $PSItem.Enabled) {
        $PSItem | Set-NetAdapterBinding -Enabled:$false


It looks like you need to specify the parameter by name.

Specifies the underlying name of the transport or filter in the following
? ms_xxxx, such as ms_tcpip.

    Required?                    false
    Position?                    named
    Default value
    Accept pipeline input?       false
    Accept wildcard characters?  true

Get-NetAdapterBinding | Set-NetAdapterBinding -ComponentID ms_tcpip6,ms_pacer

Thanks Daniel. It doesn’t throw any erros back at me but it doesn’t change anything either for some reason. That is the values remain True after running the script.

After commenting out the if condition it worked but not sure why again :slight_smile: