Skip to content

Instantly share code, notes, and snippets.

@Voronenko
Created November 13, 2017 20:13
Show Gist options
  • Save Voronenko/9358cd81c6a76ca4e3e3f7cc1fac0834 to your computer and use it in GitHub Desktop.
Save Voronenko/9358cd81c6a76ca4e3e3f7cc1fac0834 to your computer and use it in GitHub Desktop.
# netsh advfirewall firewall add rule name="Open Port 80" dir=in action=allow protocol=TCP localport=80
# netsh advfirewall firewall add rule name="Open Port 443" dir=in action=allow protocol=TCP localport=443
New-NetFirewallRule -DisplayName 'HTTP(S) Inbound' -Profile @('Domain', 'Private') -Direction Inbound -Action Allow -Protocol TCP -LocalPort @('80', '443')
Get-NetFirewallRule | Where { $_.Enabled –eq ‘True’ –and $_.Direction –eq ‘Inbound’ }
winrm quickconfig
y
winrm set winrm/config/service/Auth @{Basic="true"}
winrm set winrm/config/service @{AllowUnencrypted="true"}
winrm set winrm/config/winrs @{MaxMemoryPerShellMB="1024"}
winrm set winrm/config/client @{TrustedHosts="*"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment