The CS_WMIQuery spreadsheet allows a list of Windows Servers or workstations to have a WMI queries sequentially performed and the results collated into a single workbook.
The control buttons on the left hand side perform the following function:
Button |
Functionality |
Read |
Performs the WMI Query on the list of windows computers in column D. The list will be processed sequentially starting at Cell D2 until an empty cell is found. |
Clear Results |
Deletes the results from column E and higher |
Populates a list of Windows Computers in column D, the computers should be specified by Netbios name, a Full Stop (.) Represents the logged on computer.
Populate the WMI classes to be queried in row1 starting at Cell E1.
Select the read button to start the query, for each computer specified in Column D the WMI class specified in row 1 will be performed.
For each class query the spreadsheet will bind to the <computername>\root\cimv2 WMI namespace and perform the query "Select * from <class>"
Where <computername> is the computer specified in column D and <class> is the WMI class specified in row1.
Each computer and classs queried will create a result in the cell corresponding to the row and column of the class and computer, the result will be colour coded as per the below table.
Result |
|
OK |
The computer and class has been queried successfully |
Not found |
The computer cannot be found |
Error |
There is an error querying the class or computer |
Each WMI class queried will generate a worksheet with the same name as the class, if the class name is more than 32 characters then the worksheet name will be truncated to 32 characters.
Within the WMI class worksheet, column A will contain the names of the computers queried and columns B and higher will contain the properties of the class.
The work sheet will be populated with the results from the WMI query and once completed standard excel sorting and filtering can be applied.
Windows Management Instrumentation (WMI)
Provides a standard interface that allows Microsoft scripting languages to manage windows computers.
Standard or elevated rights are required on the local computer to perform WMI queries depending on activity. On remote computers full administrative rights are required.
If there is a firewall between the local computer and the remote computers to be WMI queried then an exception must be created if not already.
Please view Microsoft Guidance on Windows Firewall (XP SP2 and higher) here:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa389286(v=vs.85).aspx
For more information on WMI classes and their usage then please view Microsoft Guidance here:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa394554(v=vs.85).aspx
The below table summaries commonly used Win32 classes:
Class |
Description |
Hardware |
|
Win32_systemenclosure |
Represents the properties associated with a physical system enclosure. |
Win32_BIOS |
Represents the attributes of the computer system's basic input or output services (BIOS) that are installed on the computer. |
Win32_MotherboardDevice |
Represents a device that contains the central components of the computer system running Windows. |
Win32_Processor |
Represents a device capable of interpreting a sequence of machine instructions on a computer system running Windows. |
Win32_PhysicalMemory |
Represents a physical memory device located on a computer as available to the operating system. |
Win32_CDROMDrive |
Represents a CD-ROM drive on a computer system running Windows. |
Win32_DiskDrive |
Represents a physical disk drive as seen by a computer running the Windows operating system. |
Win32_NetworkAdapter |
Represents a network adapter on a computer system running Windows. |
Win32_NetworkAdapterConfiguration |
Represents the attributes and behaviours of a network adapter. The class is not guaranteed to be supported after the ratification of the Distributed Management Task Force (DMTF) CIM network specification. |
Operating System |
|
Win32_Volume |
Represents an area of storage on a hard disk. |
Win32_OperatingSystem |
Represents an operating system installed on a computer system running Windows. |
Win32_PageFile |
Represents the file used for handling virtual memory file swapping on a Windows system. |
Win32_Service |
Represents a service on a computer system running Windows. |
Win32_ScheduledJob |
Represents a job scheduled using the Windows schedule service. |
File shares |
|
Win32_DFSNode |
Represents a root or junction node of a domain-based or stand-alone distributed file system (DFS). |
Win32_DFSNodeTarget |
Represents the relationship of a DFS node to one of its targets. |
Win32_DFSTarget |
Represents the target of a DFS node |
Win32_Share |
Represents a shared resource on a computer system running Windows. |
Pint |
|
Win32_Printer |
Represents a device connected to a computer system running Windows that is capable of reproducing a visual image on a medium. |
Win32_PrinterDriver |
Represents the drivers for a Win32_Printer instance. |
Win32_PrinterConfiguration |
Defines the configuration for a printer device. |
- Details
- Category: Client Server
- Published: 04 November 2013