Enabling Windows Firewall:
netsh firewall set opmode enable
nebo
netsh advfirewall set allprofiles state on
Disabling Windows Firewall:
netsh firewall set opmode disable
nebo
netsh advfirewall set allprofiles state off
Turn on remote management on all profiles:
netsh advfirewall set allprofiles settings remotemanagement enable
Log dropped connections on all profiles:
netsh advfirewall set allprofiles logging droppedconnections enable