Skip to content

Instantly share code, notes, and snippets.

@liamjbennett
Created September 2, 2016 08:31
Show Gist options
  • Save liamjbennett/339833d167129138c752d85743fea57e to your computer and use it in GitHub Desktop.
Save liamjbennett/339833d167129138c752d85743fea57e to your computer and use it in GitHub Desktop.
Enable WinRM
winrm quickconfig -q
winrm quickconfig -transport:http
winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="2048"}'
winrm set winrm/config '@{MaxTimeoutms="1800000"}'
winrm set winrm/config/service '@{AllowUnencrypted="true"}'
winrm set winrm/config/service/auth '@{Basic="true"}'
winrm set winrm/config/service @{MaxConcurrentOperationsPerUser="5000"}
winrm set winrm/config/listener?Address=*+Transport=HTTP @{Port="5985"}
netsh advfirewall firewall add rule name="WinRM 5985" protocol=TCP dir=in localport=5985 action=allow
netsh advfirewall firewall add rule name="WinRM 5986" protocol=TCP dir=in localport=5986 action=allow
net stop winrm
sc config winrm start= auto
net start winrm
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope LocalMachin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment