Get Firewall Status
Get-NetFirewallProfile
Disable Firewall in all profiles
Set-NetFirewallProfile -Enabled false
Enable Firewall in all profiles
Set-NetFirewallProfile -Enabled true
Further commands https://www.technig.com/manage-windows-firewall-using-powershell/