Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • 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 2012
    • 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

May 24, 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.

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

Related Reading

Using PowerShell Behind a Proxy Server

July 1, 2022

How to Deploy Windows 10 (11) with PXE...

June 27, 2022

Checking Windows Activation Status on Active Directory Computers

June 27, 2022

Configuring Multiple VLAN Interfaces on Windows

June 24, 2022

How to Disable or Enable USB Drives in...

June 24, 2022

Leave a Comment Cancel Reply

Categories

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

Recent Posts

  • Using PowerShell Behind a Proxy Server

    July 1, 2022
  • How to Access VMFS Datastore from Linux, Windows, or ESXi?

    July 1, 2022
  • How to Deploy Windows 10 (11) with PXE Network Boot?

    June 27, 2022
  • Checking Windows Activation Status on Active Directory Computers

    June 27, 2022
  • Configuring Multiple VLAN Interfaces on Windows

    June 24, 2022
  • How to Disable or Enable USB Drives in Windows using Group Policy?

    June 24, 2022
  • Adding Domain Users to the Local Administrators Group in Windows

    June 23, 2022
  • Viewing a Remote User’s Desktop Session with Shadow Mode in Windows

    June 23, 2022
  • How to Create a Wi-Fi Hotspot on your Windows PC?

    June 23, 2022
  • Configuring SSH Public Key Authentication on Windows

    June 15, 2022

Follow us

woshub.com

ad

  • Facebook
  • Twitter
  • RSS
Popular Posts
  • Installing RSAT Administration Tools on Windows 10 and 11
  • Get-ADUser: Find Active Directory User Info with PowerShell
  • How to Hide Installed Programs in Windows 10 and 11?
  • Manage Windows Updates with PSWindowsUpdate PowerShell Module
  • Tracking and Analyzing Remote Desktop Connection Logs in Windows
  • PowerShell: Get Folder Sizes on Disk in Windows
  • How to Disable or Enable USB Drives in Windows using Group Policy?
Footer Logo

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


Back To Top