Remotely Disable Windows Firewall with Powershell

Today I have just been setting up a Server in a new Datacentre that I had previously setup and configured with all correct IP’s and had RDP enabled.  For some reason, when installing the Server and powering it on I could not RDP onto the Server as the Server had moved the location into the Public Firewall profile.  Rebooting the Server nor restarting the Network Location awareness service did not fix the issue.  I also did not have access to the iLO card as someone had changed the default username/password without it being documented.  So therefore I had to find a way to remotely disable the Firewall, which is really easy with PowerShell.  I hope that this helps someone out: