About a couple dozen or so of our employees use wireless tablets/laptops out in the field, at home, or even on vacation, connected via VPN back to the office. Once in a while we get a user complaining about their connection to VPN dropping even though they swear it's not their wifi connection. For example one user was recently camping and claimed to have constant VPN disconnects even though the wifi signal seemed fine, I can't even fathom what sort of internet the campground provides, anyway the employee claims that others in their party were operating normally, video conferencing, etc.

My question is: are there any utilities/scripts/etc that can run silently in the background to monitor different connection statistics, and possibly spit it out in to a log file so it can be referenced to see what the quality of their wifi connection was during these supposed rough patches?

1 Answer 1


What I ended up doing was creating tasks to run on user logon, and then again every 15 minutes, these tasks can be created with the schtasks command:

schtasks /create /sc ONLOGON /tn wifi1 /tr <.bat for 15 minute task (next two lines)>
schtasks /delete /tn wifi2 /f
schtasks /create /sc MINUTE /mo 15 /tn wifi2 /tr <.bat to spit out wifi stats logs>

the batch will run the following command

netsh wlan show interface

And spit out the results to a local "logs" folder within the same folder as the batch(es), as well as (if there is VPN connectivity) to a network share, creating a folder for the machine's %computername% to differentiate it from other machines with the same tasks/scripts running, as well as formatting the filename of each log as (date)-(time).log to differentiate it from the other logs. Here's what the batch looks like:

echo off
set CUR_YYYY=%date:~10,4%
set CUR_MM=%date:~4,2%
set CUR_DD=%date:~7,2%
set CUR_HH=%time:~0,2%
if %CUR_HH% lss 10 (set CUR_HH=0%time:~1,1%)

set CUR_NN=%time:~3,2%
set CUR_SS=%time:~6,2%
set CUR_MS=%time:~9,2%

netsh wlan show interface > C:\<path to local logs folder>\%SUBFILENAME%.log
mkdir \\<path to network share logs folder>\%computername%
netsh wlan show interface > \\<path to network share logs folder>\%computername%\%SUBFILENAME%.log

This is very crude and basic but it gathers enough info for now, in future I might try to build in some other info gathering commands, like ping times, checking the actual connection speed of the VPN rather than just the current wifi adapter, etc

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.