code: func (c *Communicator) Connect(o terraform.UIOutput) error {
  	if c.client != nil {
  		return nil
  	}
  
  	params := winrm.DefaultParameters
  	params.Timeout = formatDuration(c.Timeout())
  	if c.connInfo.NTLM == true {
  		params.TransportDecorator = func() winrm.Transporter { return &winrm.ClientNTLM{} }
  	}
  
  	client, err := winrm.NewClientWithParameters(
  		c.endpoint, c.connInfo.User, c.connInfo.Password, params)
  	if err != nil {
  		return err
  	}
  
  	if o != nil {
  		o.Output(fmt.Sprintf(
  			"Connecting to remote host via WinRM...\n"+
  				"  Host: %s\n"+
  				"  Port: %d\n"+
  				"  User: %s\n"+
  				"  Password: %t\n"+
  				"  HTTPS: %t\n"+
  				"  Insecure: %t\n"+
  				"  NTLM: %t\n"+
  				"  CACert: %t",
  			c.connInfo.Host,
  			c.connInfo.Port,
  			c.connInfo.User,
  			c.connInfo.Password != "",
  			c.connInfo.HTTPS,
  			c.connInfo.Insecure,
  			c.connInfo.NTLM,
  			c.connInfo.CACert != "",
  		))
  	}
  
  	log.Printf("[DEBUG] connecting to remote shell using WinRM")
  	shell, err := client.CreateShell()
  	if err != nil {
  		log.Printf("[ERROR] error creating shell: %s", err)
  		return err
  	}
  
  	err = shell.Close()
  	if err != nil {
  		log.Printf("[ERROR] error closing shell: %s", err)
  		return err
  	}
  
  	if o != nil {
  		o.Output("Connected!")
  	}
  
  	c.client = client
  
  	return nil
  }
docs: // Connect implementation of communicator.Communicator interface