Skip to content

Instantly share code, notes, and snippets.

@Shterneregen
Created March 26, 2020 22:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Shterneregen/917376f9cd10d0d494cc1b293f6f366c to your computer and use it in GitHub Desktop.
Save Shterneregen/917376f9cd10d0d494cc1b293f6f366c to your computer and use it in GitHub Desktop.
Get information about current connected interface via BAT (CMD)
@echo off
FOR /F "tokens=1,2 delims=: " %%A IN ('netsh wlan show interface') DO (IF "%%A"=="SSID" SET SSID=%%B)
if "%SSID%"=="" (echo no wifi) else (netsh wlan show profile name="%SSID%" key=clear)
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment