'Run a Windows WMI Query.'

def WMIQuery(self, source):

    query = source.attributes['query']
    queries = artifact_utils.InterpolateKbAttributes(query, self.state.knowledge_base, ignore_errors=self.args.ignore_interpolation_errors)
    base_object = source.attributes.get('base_object')
    for query in queries:
        self.CallClient(server_stubs.WmiQuery, query=query, base_object=base_object, request_data={'artifact_name': self.current_artifact_name, 'source': source.ToPrimitiveDict()}, next_state='ProcessCollected')
