package bridge

import (
	
	
	

	
)

// InitWinRm creates a new WinRM client and returns it
func (, , ,  string,  bool) (*winrm.Client, error) {
	,  := strconv.Atoi()
	 := winrm.NewEndpoint(, , , true, nil, nil, nil, 0)

	 := winrm.DefaultParameters
	.TransportDecorator = func() winrm.Transporter {
		return &winrm.ClientNTLM{}
	}

	,  := winrm.NewClientWithParameters(, , , )
	if  != nil {
		return nil, 
	}

	return , nil
}

// VerifyWinRm checks if WinRM authentication is valid to remote end
func (, , ,  string,  bool) bool {
	,  := strconv.Atoi()
	 := winrm.NewEndpoint(, , , true, nil, nil, nil, 0)

	 := winrm.DefaultParameters
	.TransportDecorator = func() winrm.Transporter {
		return &winrm.ClientNTLM{}
	}

	,  := winrm.NewClientWithParameters(, , , )
	if  != nil {
		return false
	}

	, , ,  := .RunWithContextWithString(context.TODO(), "hostname", "")
	return strings.TrimSpace() != ""
}