Initial commit
This commit is contained in:
21
Packer/scripts/docker/enable-winrm.ps1
Executable file
21
Packer/scripts/docker/enable-winrm.ps1
Executable file
@@ -0,0 +1,21 @@
|
||||
Enable-PSRemoting -Force
|
||||
winrm quickconfig -q
|
||||
winrm quickconfig -transport:http
|
||||
winrm set winrm/config '@{MaxTimeoutms="1800000"}'
|
||||
winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="800"}'
|
||||
winrm set winrm/config/service '@{AllowUnencrypted="true"}'
|
||||
winrm set winrm/config/service/auth '@{Basic="true"}'
|
||||
winrm set winrm/config/client/auth '@{Basic="true"}'
|
||||
winrm set winrm/config/listener?Address=*+Transport=HTTP '@{Port="5985"}'
|
||||
|
||||
if (Test-Path A:\install-containers-feature.ps1) {
|
||||
. A:\install-containers-feature.ps1
|
||||
}
|
||||
|
||||
Stop-Service winrm
|
||||
. sc.exe config winrm start= delayed-auto
|
||||
|
||||
netsh advfirewall firewall set rule group="Windows Remote Administration" new enable=yes
|
||||
netsh advfirewall firewall set rule name="Windows Remote Management (HTTP-In)" new enable=yes action=allow
|
||||
|
||||
Restart-Computer
|
||||
Reference in New Issue
Block a user