To convert this PowerShell script into an executable (.exe) file, you can still use PS2EXE as described before:
Install PS2EXE (if you haven’t already):
Install-Module -Name ps2exe
Convert the script to an executable:
Invoke-ps2exe .\ping_websites.ps1 .\ping_websites.exe
This will create an executable file named ping_websites.exe
that you can run on any Windows machine. When run, it will open a file dialog for the user to select the whitelist file, then proceed with pinging the websites and generating the report.