Sha256: f07227d95aa3331fe4ab798549c55aba519b336ae3317f69a715527b9a1cc517

Contents?: true

Size: 1.59 KB

Versions: 23

Compression:

Stored size: 1.59 KB

Contents

#ps1_sysnative

#   Copyright 2020 Stephen Pearson <stephen.pearson@oracle.com>
#
#   Licensed under the Apache License, Version 2.0 (the "License");
#   you may not use this file except in compliance with the License.
#   You may obtain a copy of the License at
#
#       http://www.apache.org/licenses/LICENSE-2.0
#
#   Unless required by applicable law or agreed to in writing, software
#   distributed under the License is distributed on an "AS IS" BASIS,
#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#   See the License for the specific language governing permissions and
#   limitations under the License.

Write-Output "Setting <%= state[:username] %> password"
net user <%= state[:username] %> '<%= state[:password] %>'

Write-Output "Configuring WinRM"
Set-NetFirewallRule -Name "WINRM-HTTP-In-TCP" -RemoteAddress Any
winrm set winrm/config/service '@{AllowUnencrypted="true"}'
winrm quickconfig -quiet
Enable-PSRemoting -Force

winrm set winrm/config/client/auth '@{Basic="true"}'
winrm set winrm/config/service/auth '@{Basic="true"}'
winrm set winrm/config/service '@{AllowUnencrypted="true"}'
winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="300"}'
winrm set winrm/config '@{MaxTimeoutms="1800000"}'

netsh advfirewall firewall add rule name="WinRM HTTP" protocol=TCP dir=in profile=any localport=5985 remoteip=any localip=any action=allow
netsh advfirewall firewall add rule name="WinRM HTTPS" protocol=TCP dir=in profile=any localport=5986 remoteip=any localip=any action=allow

net stop winrm
sc.exe config winrm start=auto
net start winrm

Write-Output "Configured WinRM"

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
kitchen-oci-1.26.0 tpl/setup_winrm.ps1.erb
kitchen-oci-1.25.0 tpl/setup_winrm.ps1.erb
kitchen-oci-1.24.0 tpl/setup_winrm.ps1.erb
kitchen-oci-1.23.0 tpl/setup_winrm.ps1.erb
kitchen-oci-1.22.0 tpl/setup_winrm.ps1.erb
kitchen-oci-1.21.0 tpl/setup_winrm.ps1.erb
kitchen-oci-1.20.0 tpl/setup_winrm.ps1.erb
kitchen-oci-1.19.0 tpl/setup_winrm.ps1.erb
kitchen-oci-1.18.1 tpl/setup_winrm.ps1.erb
kitchen-oci-1.18.0 tpl/setup_winrm.ps1.erb
kitchen-oci-1.17.0 tpl/setup_winrm.ps1.erb
kitchen-oci-1.16.2 tpl/setup_winrm.ps1.erb
kitchen-oci-1.16.1 tpl/setup_winrm.ps1.erb
kitchen-oci-1.15.1 tpl/setup_winrm.ps1.erb
kitchen-oci-1.15.0 tpl/setup_winrm.ps1.erb
kitchen-oci-1.14.0 tpl/setup_winrm.ps1.erb
kitchen-oci-1.13.0 tpl/setup_winrm.ps1.erb
kitchen-oci-1.12.3 tpl/setup_winrm.ps1.erb
kitchen-oci-1.12.1 tpl/setup_winrm.ps1.erb
kitchen-oci-1.12.0 tpl/setup_winrm.ps1.erb