Skip to content

Commit

Permalink
revert to the default winrm service startup type of delayed-auto
Browse files Browse the repository at this point in the history
  • Loading branch information
rgl committed Jul 27, 2018
1 parent dddfdc4 commit c61ddf2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions winrm.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,12 @@ Get-NetConnectionProfile `
| Set-NetConnectionProfile -NetworkCategory Private

# configure WinRM.
# WARN do not be tempted to change the default WinRM service startup type from
# delayed-auto to auto, as the later proved to be unreliable.
Write-Output 'Configuring WinRM...'
winrm quickconfig -quiet
winrm set winrm/config/service '@{AllowUnencrypted="true"}'
winrm set winrm/config/service/auth '@{Basic="true"}'
$result = sc.exe config WinRM start= auto
if ($result -ne '[SC] ChangeServiceConfig SUCCESS') {
throw "sc.exe config failed with $result"
}

## dump the WinRM configuration.
#winrm enumerate winrm/config/listener
Expand Down

0 comments on commit c61ddf2

Please sign in to comment.