Project

General

Profile

$wmiquery » History » Version 12

Per Amundsen, 02/23/2023 07:57 PM

1 1 Per Amundsen
_Added in 1.9.7_
2
3 10 Per Amundsen
*$wmiquery([path], query, [N], N|key)*
4 1 Per Amundsen
5 9 Per Amundsen
Performs a "WMI":https://msdn.microsoft.com/en-us/library/aa394582%28v=vs.85%29.aspx query and return the Nth value.
6 1 Per Amundsen
7
*Parameters*
8
9 11 Per Amundsen
table(ktable).
10
|*Parameter*|*Description*|
11
| [path] | Optional path. |
12
| query | Query to perform. |
13
| [N] | If 0, numbers of results else the Nth value (optional, default is 1) |
14
| N<notextile>|</notextile>key | The key to get or the Nth key. |
15 1 Per Amundsen
16
*Properties*
17 10 Per Amundsen
18 11 Per Amundsen
table(ktable).
19 1 Per Amundsen
|*Property*|*Description*|
20 12 Per Amundsen
| .key | Returns the name of the Nth key if N<notextile>|</notextile>key is a number. |
21
22 1 Per Amundsen
*Example*
23
24
<pre>
25 3 Per Amundsen
; Prints the cpu l2 cache
26 5 Per Amundsen
//echo -ag l2 cache is $wmiquery(SELECT * FROM Win32_Processor, L2CacheSize)
27 1 Per Amundsen
</pre>