Reset-NetAdapterAdvancedProperty properties

Hello i would like to define mulitiple value for folloring script part:

Reset-NetAdapterAdvancedProperty -InterfaceDescription -DisplayName "*"

so i want to reset adapter which description start with: “Realtek PCIe” And with “Remote NDIS”

can i use select object or something to do that? becouse i cannot pass input from this script becouse following parameter (DisplayName) necessary

GET commands typically filter, so you would may try something like:

Get-NetAdapter -Name 'VMWare*','Blue*' | Remove-NetAdapterAdvancedProperty

And how to specify which property to remove of the passed adapters? $_. something?


The pipeline is passing the adapter name, so you set the properties on Remove-NetAdapterAdvancedProperty

Get-NetAdapter -Name 'VMWare*','Blue*' | Remove-NetAdapterAdvancedProperty -RegistryKeyword "myKeyword" -AllProperties

Thank you!

And can i use regex as value of each property?

[quote quote=292195]And can i use regex as value of each property?


Take a look at Get-Help Reset-NetAdapterAdvancedProperty. The docs will tell you what every parameter will accept as an argument. For example, from the docs:

    -RegistryKeyword <String[]>
        Specifies the name of the registry keyword to be removed as an array.

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

This parameter will take an array of strings and does not accept wildcard characters. If it accepted/required regex, it would state it. For example this is from Get-Help Select-String:

    -Pattern <System.String[]>
        Specifies the text to find on each line. The pattern value is treated as a regular expression.

        Required?                    true
        Position?                    0
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false


Thank you