Module wmiutils :: Class PowerShelWmilQueryBuilder
[hide private]

Class PowerShelWmilQueryBuilder

source code

BaseWmiQueryBuilder --+    
                      |    
       WmicQueryBuilder --+
                          |
                         PowerShelWmilQueryBuilder

PowerShell specific query builder. It uses PowerShell native WMI command line calls. Added some fake methods in order to provide compatibility and abstraction layer from the exact call methods of shell WmicQueryBuilder

Instance Methods [hide private]
 
__init__(self, objectName) source code
 
setOutputFile(self, outputFile) source code
 
usePathCommand(self, value) source code
 
setNamespace(self, namespace)
Sets queried object namespace
source code
 
useSplitListOutput(self, value) source code
 
buildQuery(self)
Builds wmic query using template: wmic %(output)s%(namespace)s%(path)s%(object)s%(where)s get %(properties)s /value < %%SystemRoot%%\win.ini
source code

Inherited from WmicQueryBuilder: parseResults

Inherited from BaseWmiQueryBuilder: addQueryElement, addWhereClause, addWmiObjectProperties, getObjectName

Class Variables [hide private]
  QUERY_TEMPLATE = 'Get-WmiObject %(namespace)s -Query "SELECT %...

Inherited from WmicQueryBuilder: WMIC_QUERY_TEMPLATE

Method Details [hide private]

__init__(self, objectName)
(Constructor)

source code 
Parameters:
  • objectName - the name of the queried CIM class
Overrides: BaseWmiQueryBuilder.__init__
(inherited documentation)

setOutputFile(self, outputFile)

source code 
Overrides: WmicQueryBuilder.setOutputFile

usePathCommand(self, value)

source code 
Overrides: WmicQueryBuilder.usePathCommand

setNamespace(self, namespace)

source code 

Sets queried object namespace

Overrides: WmicQueryBuilder.setNamespace
(inherited documentation)

useSplitListOutput(self, value)

source code 
Overrides: WmicQueryBuilder.useSplitListOutput

buildQuery(self)

source code 

Builds wmic query using template: wmic %(output)s%(namespace)s%(path)s%(object)s%(where)s get %(properties)s /value < %%SystemRoot%%\win.ini

Overrides: BaseWmiQueryBuilder.buildQuery
(inherited documentation)

Class Variable Details [hide private]

QUERY_TEMPLATE

Value:
'Get-WmiObject %(namespace)s -Query "SELECT %(properties)s FROM %(obje\
ct)s %(where)s" | Format-List %(properties)s'