Firewall with Powershell Cheat Sheet for use with powershell task automation framework.
Firewall
Enable ICMP
netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request" protocol=icmpv4:8,any dir=in action=allow
Enable Specific Port
netsh advfirewall firewall add rule name="Open Port 80" dir=in action=allow protocol=TCP localport=80
Bypass Proxy during Web Client call
$wc = new-object System.Net.WebClient
$wc.Headers.Add("user-agent", "PowerShell Script")
$wc.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials
Bypass TLS validation during Web Client call
$AllProtocols = [System.Net.SecurityProtocolType]'Ssl3,Tls,Tls11,Tls12'
[System.Net.ServicePointManager]::SecurityProtocol = $AllProtocols
[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}
$wc = New-Object System.Net.WebClient
$wc.DownloadString("https://...")