A Windows PowerShell script that provides a graphical user interface (GUI) to scan, display, and connect to available Wi-Fi networks. This script allows entering a Wi-Fi password securely, handles various authentication and encryption types, and logs connection attempts.
-
Scans and lists nearby Wi-Fi networks using native Windows
netsh wlancommands. -
Shows a GUI list box to select a Wi-Fi network.
-
Password input with show/hide toggle capability.
-
Automatically detects Wi-Fi authentication and encryption type.
-
Creates and applies a Wi-Fi profile XML for connection.
-
Provides informative popups and logs user activities and connection results to a log file.
-
Refresh button to rescan for networks.
-
Self-cleanup of temporary Wi-Fi profile files.
-
WiFiConnect.ps1- The main PowerShell script implementing the GUI and Wi-Fi connection logic. -
run.cmd- A batch file to launch the PowerShell script with execution policy bypass (for ease of use).
-
Run
run.cmdto start the script. This will open the Wi-Fi selection window. -
Select a Wi-Fi network from the list.
-
Enter the Wi-Fi password if the network requires authentication. or replace PastePasswordHere in WiFiConnect.ps1
-
Click the "Connect" button to connect to the selected network.
-
Optionally, click "Refresh" to rescan available networks.
-
Windows OS with PowerShell support.
-
Execution policy allowing script execution or use the provided batch file to bypass policy restrictions.
-
Administrative privileges may be required to add Wi-Fi profiles and connect.
The script writes a log file named WiFiConnect.log in the script directory that records events such as network scans, user interactions, and connection attempts.