Created
March 26, 2020 22:12
-
-
Save Shterneregen/917376f9cd10d0d494cc1b293f6f366c to your computer and use it in GitHub Desktop.
Get information about current connected interface via BAT (CMD)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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