def execute_return_result(cmd):
    """
    Executes the passed command. Returns the standard out if successful

    :param str cmd: The command to run

    :return: The standard out of the command if successful, otherwise returns
    an error
    :rtype: str

    :raises: Error if command fails or is not supported
    """
    ret = _run_all(cmd)

    if ret["retcode"] != 0 or "not supported" in ret["stdout"].lower():
        msg = "Command Failed: {}\n".format(cmd)
        msg += "Return Code: {}\n".format(ret["retcode"])
        msg += "Output: {}\n".format(ret["stdout"])
        msg += "Error: {}\n".format(ret["stderr"])
        raise CommandExecutionError(msg)

    return ret["stdout"]