diff --git a/examples/scripts/ConfigureRemotingForAnsible.ps1 b/examples/scripts/ConfigureRemotingForAnsible.ps1 index e23a60b721c..8d778c54e8a 100644 --- a/examples/scripts/ConfigureRemotingForAnsible.ps1 +++ b/examples/scripts/ConfigureRemotingForAnsible.ps1 @@ -103,6 +103,8 @@ ElseIf ((Get-Service "WinRM").Status -ne "Running") { Write-Verbose "Starting WinRM service." Start-Service -Name "WinRM" -ErrorAction Stop + Write-Verbose "Start WinRM service automatic" + Set-Service -Name "WinRM" -StartupType Automatic } # WinRM should be running; check that we have a PS session config.