def list(session, attributes='Name,ConfigManagerErrorCode'):
    """
    Description: return list of all devices on windows machine

    :param session: instance of Windows, which hold session to win machine
    :type session: winremote.Windows
    :param attributes: comma delimited name of attributes to be returned
    :type attributes: str
    :returns: list of devices info
    :rtype: list of dict
    """
    return session._wmi.query('select %s from Win32_PnPEntity' % attributes)
