netsh advfirewall set allprofiles firewallpolicy blockinbound,blockoutbound
netsh advfirewall set allprofiles firewallpolicy allowinbound,allowoutbound
netsh advfirewall reset
netsh advfirewall show allprofiles
netsh advfirewall show allprofiles | findstr "State"
$ips = (Resolve-DnsName codeforces.com -ErrorAction Stop |
Where-Object {
netsh advfirewall firewall add rule name="Allow Codeforces" dir=out action=allow protocol=any remoteip=$ips
netsh advfirewall firewall show rule name="Allow Codeforces"
Get-NetFirewallRule -PolicyStore PersistentStore | Where-Object { $_.Enabled -eq $true } | Format-Table -AutoSize