This command doesn't work:
netsh advfirewall set allprofiles firewallpolicy blockinboundalways,allowoutbound
This command works:
netsh advfirewall set allprofiles state on
I've tried using invoke-command and &, but I could not get it to work. When I run the above command in PS, it tells me:
The number of arguments provided is not valid. Check help for the correct syntax.