There are some situtations in which you need to modify Windows firewall configuration and you have only command-line access. In these cases, you can make use of the command
netsh Command Prompt.
netsh is available from Windows 2000 and above.
Command to display the status of the firewall of the machine:
netsh firewall show opmode
Turns off firewall state for all the profiles:
netsh advfirewall set allprofiles state off