26 lines
1.0 KiB
Plaintext
26 lines
1.0 KiB
Plaintext
' Pandora FMS Agent Inventory Plugin for Microsoft Windows (All platfforms)
|
|
' (c) 2015 Borja Sanchez <fborja.sanchez@artica.es>
|
|
' This plugin extends agent inventory feature. Only enterprise version
|
|
' --------------------------------------------------------------------------
|
|
on error resume next
|
|
'WMI architecture
|
|
|
|
|
|
Wscript.StdOut.WriteLine "<inventory>"
|
|
Wscript.StdOut.WriteLine "<inventory_module>"
|
|
Wscript.StdOut.WriteLine "<name>Architecture</name>"
|
|
Wscript.StdOut.WriteLine "<type><![CDATA[generic_data_string]]></type>"
|
|
Wscript.StdOut.WriteLine "<datalist>"
|
|
|
|
strComputer = "."
|
|
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
|
|
Set cols = objWMIService.ExecQuery("Select osarchitecture from Win32_OperatingSystem")
|
|
|
|
For Each data In cols
|
|
Wscript.StdOut.WriteLine "<data><![CDATA[" & data.osarchitecture & "]]></data>"
|
|
Next
|
|
|
|
Wscript.StdOut.WriteLine "</datalist>"
|
|
Wscript.StdOut.WriteLine "</inventory_module>"
|
|
Wscript.StdOut.WriteLine "</inventory>"
|