Skip to content

Commit

Permalink
Set WinRM default port to 5986 when using https (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
kke authored Feb 18, 2021
1 parent 4d67da8 commit 6165ecc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions winrm.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ func (c *WinRM) SetDefaults() {
if p, err := homedir.Expand(c.KeyPath); err == nil {
c.KeyPath = p
}

if c.Port == 5985 && c.UseHTTPS {
c.Port = 5986
}
}

// Protocol returns the protocol name, "WinRM"
Expand Down

0 comments on commit 6165ecc

Please sign in to comment.