Firewall Switch Batch Script using command line Windows 10

Firewall Switch Batch Script using command line for Windows 10
 
Save as .bat
 
ECHO OFF
CLS
:MENU
ECHO.
ECHO ...............................................
ECHO PRESS 1 OR 2 to select your task, or 3 to EXIT.
ECHO ...............................................
ECHO.
ECHO 1 - Firewall OFF
ECHO 2 - Firewall ON
ECHO 3 - EXIT
ECHO.
SET /P M=Type 1, 2, or 3 then press ENTER:
IF %M%==1 GOTO fwoff
IF %M%==2 GOTO fwon
IF %M%==3 GOTO EOF
:fwoff
netsh advfirewall set privateprofile state off
netsh advfirewall set publicprofile state off
GOTO MENU
:fwon
netsh advfirewall set privateprofile state on
netsh advfirewall set publicprofile state on
GOTO MENU