To turn off the firewall using Windows PowerShell in Windows Server 2012:
  1. Open Windows PowerShell.
  2. Type Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False.

 

Enable Ping:
Import-Module NetSecurity
New-NetFirewallRule -Name Allow_Ping -DisplayName “Allow Ping”  -Description “Packet Internet Groper ICMPv4” -Protocol ICMPv4 -IcmpType 8 -Enabled True -Profile Any -Action Allow