Modifying network adapter settings

This topic contains 4 replies, has 3 voices, and was last updated by Profile photo of Jarek C. Jarek C. 1 year, 10 months ago.

  • Author
  • #24825
    Profile photo of Jarek C.
    Jarek C.

    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?

  • #24826
    Profile photo of Daniel Krebs
    Daniel Krebs

    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


  • #24827
    Profile photo of Jason Wasser
    Jason Wasser

    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

  • #24828
    Profile photo of Jarek C.
    Jarek C.

    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.

  • #24830
    Profile photo of Jarek C.
    Jarek C.

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

You must be logged in to reply to this topic.