Category filter
Script to fetch list of previously connected Wi-Fi networks on Windows
Administrators might want to monitor the Wi-Fi networks that their corporate devices connect to. It helps them ensure that the devices only connect to safe Wi-Fi networks. Hexnode lets admins
deploy scripts to get a list of previously connected Wi-Fi networks.
Fetch the list of previously connected Wi-Fi networks
When the device is connected to a Wi-Fi network, it creates a WLAN profile that consists of details specific to the network.
The following Batch script retrieves a list of all Wi-Fi networks accessed from the device.
1 2 |
@echo off Echo | netsh wlan show profile |
The PowerShell script to obtain the previously accessed Wi-Fi networks from a Windows device takes the following form:
1 |
Netsh wlan show profiles |Write-Output |