lib/hawatel_ps/windows/wmi/wmi_cli.rb
def create_wmi_ole_instances(dataset)
        instances = []
        dataset.each do |wmi_object|
          instances.push(Instance.new(wmi_object))
        end
        instances
      end
# Create the WMI32OLE instance from a data set.
# @param dataset [WMI32OLE] List of WMI objects
# @example
#   results = @session.ExecQuery(wql_query)
#   wmi_ole_instances = create_wmi_ole_instances(results)
# @return [Array<WmiCli::Instance>]
Create the WMI32OLE instance from a data set.
Create the WMI32OLE instance from a data set .
def create_wmi_ole_instances(dataset)
        instances = []
        dataset.each do |wmi_object|
          instances.push(Instance.new(wmi_object))
        end
        instances
      end
def create_wmi_ole_instances ( dataset ) instances = [ ] dataset . each do | wmi_object | instances . push ( Instance . new ( wmi_object ) ) end instances end
Create the WMI32OLE instance from a data set.
Create the WMI32OLE instance from a data set .
None
Array<WmiCli::Instance>
dataset
List of WMI objects
List of WMI objects
example
results = @session.ExecQuery(wql_query) wmi_ole_instances = create_wmi_ole_instances(results)
results = @session . ExecQuery ( wql_query ) wmi_ole_instances = create_wmi_ole_instances ( results )