Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

 Windows OS Hub / Windows 10 / Check Wi-Fi Signal Strength on Windows with PowerShell

June 7, 2022 PowerShellWindows 10Windows 11

Check Wi-Fi Signal Strength on Windows with PowerShell

Wi-Fi signal strength affects the quality of your Internet connection. On Windows, you can check the current Wi-Fi signal strength in several ways. I tried to learn how to check the current Wi-Fi strength using PowerShell, display a notification if the signal quality has dropped, and display a list of all available wireless networks with their parameters.

A Windows 10 user can evaluate the Wi-Fi strength of the current connection with a wireless network icon in the taskbar. Click on the icon and you will see a list of available Wi-Fi networks.

list of available wifi network on windows 10

Each Wi-Fi network has an icon with bars. The more bars, the better the signal strength of the wireless access point. Three bars mean that the signal quality is between 75% and 100%. If the connection icon has two bars, the Wi-Fi signal strength is between 50% and 75%, etc.

You can get a more accurate value of the signal strength with the command prompt. List all parameters of the current wireless connection using the command:

netsh wlan show interfaces

netsh wlan show interfaces

The Wi-Fi signal strength is highlighted in the screenshot (Signal: 72%).

Using PowerShell, you can get only the signal strength value in a percent:

(netsh wlan show interfaces) -Match '^\s+Signal' -Replace '^\s+Signal\s+:\s+',''

powershell get wifi signal strength in percent

Using a simple PowerShell script, you can display a pop-up notification if the Wi-Fi signal strength is less than 30%:

$cur_strength=(netsh wlan show interfaces) -Match '^\s+Signal' -Replace '^\s+Signal\s+:\s+','' | Out-String
If ($cur_strength.replace('%','') –le 30)
{
Add-Type -AssemblyName System.Windows.Forms
$global:balmsg = New-Object System.Windows.Forms.NotifyIcon
$path = (Get-Process -id $pid).Path
$balmsg.Icon = [System.Drawing.Icon]::ExtractAssociatedIcon($path)
$balmsg.BalloonTipIcon = [System.Windows.Forms.ToolTipIcon]::Warning
$balmsg.BalloonTipText = “The Wi-Fi signal strength is less than $cur_strength Go back to the access point!”
$balmsg.BalloonTipTitle = "Attention $Env:USERNAME"
$balmsg.Visible = $true
$balmsg.ShowBalloonTip(10000)
}

show poor wi-fi connection notification on windows

You can run this PowerShell code in an infinite loop and check the status of the signal once every 10 seconds, or make it a Windows service that will notify you if the Wi-Fi connection is poor.

You can also use netsh to also display a list of all available wireless networks in your wireless adapter’s range (not only the list of saved Wi-Fi networks):

netsh wlan show network mode=bssid

The following PowerShell script scans all available Wi-Fi networks (including Windows access points), displays their names, signal strength, channels (useful if you want to find free channels), and supported standards (802.11n, 802.11ac, 802.11g, etc.).

$logs=@()
$date=Get-Date
$cmd=netsh wlan show networks mode=bssid
$n=$cmd.Count
For($i=0;$i -lt $n;$i++)
{
If($cmd[$i] -Match '^SSID[^:]+:.(.*)$')
{
$ssid=$Matches[1]
$i++
$bool=$cmd[$i] -Match 'Type[^:]+:.(.+)$'
$Type=$Matches[1]
$i++
$bool=$cmd[$i] -Match 'Authentication[^:]+:.(.+)$'
$authent=$Matches[1]
$i++
$bool=$cmd[$i] -Match 'Cipher[^:]+:.(.+)$'
$chiffrement=$Matches[1]
$i++
While($cmd[$i] -Match 'BSSID[^:]+:.(.+)$')
{
$bssid=$Matches[1]
$i++
$bool=$cmd[$i] -Match 'Signal[^:]+:.(.+)$'
$signal=$Matches[1]
$i++
$bool=$cmd[$i] -Match 'Type[^:]+:.(.+)$'
$radio=$Matches[1]
$i++
$bool=$cmd[$i] -Match 'Channel[^:]+:.(.+)$'
$Channel=$Matches[1]
$i=$i+2
$logs+=[PSCustomObject]@{date=$date;ssid=$ssid;Authentication=$authent;Cipher=$chiffrement;bssid=$bssid;signal=$signal;radio=$radio;Channel=$Channel}
}
}
}
$cmd=$null
$logs|Out-GridView -Title 'Scan Wifi Script'

You will see a simple Out-GridView table containing information about the parameters of all available wireless networks.

PowerShell WiFi Analyzer script

My screenshot shows that channel 11 is heavily used in my environment, so it is worth running my access point on another channel.

You can use the script to make sure if your adapter sees 5GHz Wi-Fi networks.

1 comment
3
Facebook Twitter Google + Pinterest
previous post
Outlook Keeps Asking for Password on Windows
next post
PowerShell Profile Files: Getting Started

Related Reading

Zabbix: How to Get Data from PowerShell Scripts

October 27, 2023

Tracking Printer Usage with Windows Event Viewer Logs

October 19, 2023

PowerShell: Configure Certificate-Based Authentication for Exchange Online (Azure)

October 15, 2023

How to Query and Change Teams User Presence...

October 8, 2023

How to Use Ansible to Manage Windows Machines

September 25, 2023

1 comment

Georgio December 11, 2022 - 6:34 am

hey theres smth wrong with the script it’s showing the radio band under radio and channel…i need to see the channel nbmr help

Reply

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMWare
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • Zabbix: How to Get Data from PowerShell Scripts

    October 27, 2023
  • Tracking Printer Usage with Windows Event Viewer Logs

    October 19, 2023
  • PowerShell: Configure Certificate-Based Authentication for Exchange Online (Azure)

    October 15, 2023
  • Reset Root Password in VMware ESXi

    October 12, 2023
  • How to Query and Change Teams User Presence Status with PowerShell

    October 8, 2023
  • How to Increase Size of Disk Partition in Ubuntu

    October 5, 2023
  • How to Use Ansible to Manage Windows Machines

    September 25, 2023
  • Installing Language Pack in Windows 10/11 with PowerShell

    September 15, 2023
  • Configure Email Forwarding for Mailbox on Exchange Server/Microsoft 365

    September 14, 2023
  • How to View and Change BIOS (UEFI) Settings with PowerShell

    September 13, 2023

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • Fix: Remote Desktop Licensing Mode is not Configured
  • Manage Windows Updates with PSWindowsUpdate PowerShell Module
  • Configuring Port Forwarding in Windows
  • Start Menu or Taskbar Search Not Working in Windows 10/11
  • How to Install Remote Server Administration Tools (RSAT) on Windows
  • How to Delete Old User Profiles in Windows
  • Get-ADUser: Find Active Directory User Info with PowerShell
Footer Logo

@2014 - 2023 - Windows OS Hub. All about operating systems for sysadmins


Back To Top