def shell(shell_type, shell_opts = {})
      shell = shell_factory.create_shell(shell_type, shell_opts)
      if block_given?
        begin
          yield shell
        ensure
          shell.close
        end
      else
        shell
      end
    end
def shell(shell_type, shell_opts = {})
      shell = shell_factory.create_shell(shell_type, shell_opts)
      if block_given?
        begin
          yield shell
        ensure
          shell.close
        end
      else
        shell
      end
    end
Creates a new shell on the remote Windows server associated with
 this connection.
 @param shell_type [Symbol] The shell type :cmd or :powershell
 @param shell_opts [Hash] Options targeted for the created shell
 @return [Shell] PowerShell or Cmd shell instance.