Important Notice: On February 29th, this community was put into read-only mode. All existing posts will remain but customers are unable to add new posts or comment on existing. Please feel to join our Community Discord for any questions and discussions.

Question regarding setting advanced properties of a Wifi adapter

Today the following question was asked on the webcast:

"Can you change the wireless adapter driver advanced settings using PDQ Deploy and Powershell? Looking to change "Preferred band" to 5GHz and "Roaming Aggressiveness" to less aggressive."

The answer is YES, you can :)

You'll want to run the following first:


Take note of the InterfaceAlias property for your wireless connection. Is it the same across your fleet of wifi enabled devices? You'll want to check and be sure to code for that.

The next thing to do is to find out some advanced property information so you name things correctly in your Set- command

Something like this:

Get-NetAdapterAdvancedProperty -InterfaceAlias "Alias from above cmdlet"

That's going to return all the advanced data that you can manipulate. Take note of the RegistryKeyword column for the properties you want (I'm going to assume they will be something like PreferredBand and RoamingAggressiveness, but be sure to use the exact keyword name).

You can then use the following to set the correct values:

Set-NetAdapterAdvancedProperty -InterfaceAlias "Alias from first command" -RegistryKeyword "PreferredBand" -RegistryValue "5 GHz"

Do note, I don't have a wifi device available at the moment to thoroughly test this, but do some digging on your end to see what the registry values are currently, and what they can be, and adjust the command above to match.

If you have many InterfaceAliases to deal with, you could build some logic into a proper script that checks for the wifi adapter, grabs its alias, and then uses a Switch {} statement to execute the correct Set-NetAdapterAdvancedProperty cmdlet. If you need assistance with setting that up, post here and I will be more than happy to help you along. 

Hope that helps you get moving in a forward direction with this task!



1 comment
Date Votes
  • Please excuse what may be interrupted as WTF! I am a beginner/intermediate Powershell user. We are needing the same script as described. I have started working on this and this is what I currently have. I have only done this test for 1 device in my organization. I feel going forward using "KeywordValue" may be in my best interest. Thoughts?

    $networkadapters = Get-NetAdapter -Name "Wi-Fi" -Physical if($networkadapters -ne $null) { foreach ($adapter in $networkadapters) { $AdapterPropertyList = Get-NetAdapterAdvancedProperty -Name "Wi-Fi" | Select-Object DisplayName foreach ($AdapterProperty in $AdapterPropertyList) { if($AdapterProperty.DisplayName -eq "Preferred Band") { Set-NetAdapterAdvancedProperty -Name "Wi-Fi" -DisplayName "Preferred Band" -DisplayValue "3. Prefer 5GHz band" Write-host "Successful Preferred Band change" } elseif ($AdapterProperty.DisplayName -eq "Roaming Aggressiveness") { Write-host "Successful Roaming Aggressiveness change" Set-NetAdapterAdvancedProperty -Name "Wi-Fi" -DisplayName "Roaming Aggressiveness" -DisplayValue "4. Medium-High" } else { Write-host "Not a matching property" } } } } else { Write-host "No Wi-Fi Network Adapters present" exit Write-host "Debug Information: Script did not exit" }