$wmiquery » History » Version 10
Per Amundsen, 07/07/2017 08:54 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 | 8 | Per Amundsen | [path] - Optional path. |
10 | 1 | Per Amundsen | query - Query to perform. |
11 | [N] - If 0, numbers of results else the Nth value (optional, default is 1) |
||
12 | 10 | Per Amundsen | N|key - The key to get or the Nth key. |
13 | |||
14 | *Properties* |
||
15 | .key - Returns the name of the Nth key if N|key is a number. |
||
16 | 1 | Per Amundsen | |
17 | *Example* |
||
18 | |||
19 | <pre> |
||
20 | 3 | Per Amundsen | ; Prints the cpu l2 cache |
21 | 5 | Per Amundsen | //echo -ag l2 cache is $wmiquery(SELECT * FROM Win32_Processor, L2CacheSize) |
22 | 1 | Per Amundsen | </pre> |