HP ProLiant SL4545 HP Scripting Toolkit 9.30 for Windows User Guide - Page 23
Using HWQUERY, HWQUERY command-line syntax, HWQUERY return codes
![]() |
View all HP ProLiant SL4545 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 23 highlights
Expression input HWQ:SystemName eq "ProLiant DL380 G2" and "PCI:Smart Array 5i" and HWQ:ROMDate eq "11/12/2004" Result True if the system is a ProLiant DL380 G2 with a Smart Array 5i Controller present and a ROM date of 11/12/2004 "PCI:Smart Array 5i" or "PCI:Smart Array True if the system contains a Smart Array 5i Controller or 6i" a Smart Array 6i Controller Using HWQUERY HWQUERY is used from a script, in conjunction with other utilities, to control the deployment. The HWQUERY utility enables you to use data from the hardware discovery file in your own scripts. HWQUERY cannot alter environment variables directly. To set the variable, the output of HWQUERY must be used by the hosting script. The most common way to use it is to write the output to an intermediate script that is subsequently called by the hosting script. HWQUERY command-line syntax hwquery [drive:][path]hpdiscoveryfilename [drive:][path]allboards.xml variable= ... HWQUERY command line arguments Command-line argument [drive:][path]hpdiscoveryfilename [drive:][path]allboards.xml variable= ... Description This argument specifies the hardware discovery file used to run the query. This argument specifies the allboards.xml PCI device list file, which is used to convert PCI IDs found in hardware discovery into device names, such as "Smart Array 5i Controller." In this argument, variable is the name of an environment variable and is a PCI device name or the name of an element from the hardware discovery file. Arguments must be in quotes if contains spaces. is case-sensitive. You can specify multiple variable= arguments. HWQUERY return codes Value 0 n HWQUERY command-line examples Meaning The command was completed successfully. N arguments were ignored because they were not in the variable= format. Command-line argument hwquery hpdiscovery.xml allboards.xml MY_SYS_RAM=TotalRAM Description For a hpdiscovery.xml file that contains 768, HWQUERY produces the following: Using HWQUERY 23
![](/manual_guide/products/hewlettpackard-proliant-dl320e-hp-scripting-toolkit-930-windows-user-guide-62e0db0/23.png)