Using WMI Event Logging Provider
Windows Management Instrumentation (WMI) is use to set up standards for creating, reading, and modifying management information. The functionality of WMI is similar to a database. The WMI database known as the repository stores information about different components, such as, devices, services, and application. The WMI providers pass the information to the WMI Object Manager that enters the information in the repository.
The WMI providers provide description about the operating system. The administrator can view the information about network configuration, processes that are running, installed services, hardware, and software. You can access the information stored in the WMI repository with the help of management tools, Application Programming Interfaces, scripting tools, or command line using Windows Management Interface Command-line (WMIC). WMIuses Common Information Model (CIM). Objects that are present in the management environment are described by the CIM.
WMIC is an easy command line interface that enables to work with WMI. Computers running on different versions of Microsoft windows can be managed with the help of WMIC. To manage and monitor remote computers with the help of WMIC, WMI needs to be on the local computer that you want to monitor and WMIC can be available remotely.
WMIC enables to perform the following task:
> Local management of a computer - Enables to manage the local computer. You can use WMIC on the local computer to manage that computer.Remote management of a computer - Enables to manage remote computer. You can use WMIC on one computer to manage another computer. > Remote management of multiple computers - Enables to manage multiple remote computers. You can use WMIC on one computer to manage multiple remote computers with a single command.
> Administrative scripting - Enables to manage local, remote, or multiple computers by writing management script with the help of WMIC.
To access the information from the WMI you need to use queries in WMIC. WMI query is known as aliases. Aliases enables to access information that administrator would require for managing and monitoring different computers.
Aliases perform certain task and these tasks can be issued using certain verbs along with the alias. The most useful verbs that can be used with the alias are:
> CALL - Executes the specified methods. For example, to start a particular service enter, service call startservice. It will execute the command to start the service.
> GET - Displays the values of a particular property.
> LIST - Displays all the values for a given alias.
> LIST BRIEF - Displays only the important information about the alias.The output of the WMIC command can be redirected to CSV file, text file, or HTML page. Redirecting the output enables you to analyze the information in much better format.
To view the information about the processes whose processlD is greater than 300 using WMIC:
1. Select Start 4 Programs 4 Accessories 4 Command Prompt. The Command Prompt window appears.
2. Enter WMIC and press enter.
3. Enter process where 'process iD>300' list brief and press enter. The list of all processes whose ID>300 appears.
The Command Prompt - wmic window displays all the processes whose ID is greater than 300.
