diff --git a/winrm.go b/winrm.go index 2c9834cd..0f27e20d 100644 --- a/winrm.go +++ b/winrm.go @@ -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"