def create_new_connection(options, &block)
      if @connection
        logger.debug("[WinRM] shutting previous connection #{@connection}")
        @connection.close
      end

      @connection_options = options
      @connection = Connection.new(options, &block)
    end
def create_new_connection(options, &block)
      if @connection
        logger.debug("[WinRM] shutting previous connection #{@connection}")
        @connection.close
      end

      @connection_options = options
      @connection = Connection.new(options, &block)
    end
Creates a new WinRM Connection instance and save it for potential
 future reuse.

 @param options [Hash] conneciton options
 @return [WinRM::Connection] a WinRM Connection instance
 @api private