Thursday 25 December 2014

WMI data reader

The WMI Data Reader task runs queries using the Windows Management Instrumentation (WMI) Query Language that returns information from WMI about a computer system. You can use the WMI Data Reader task for the following purposes:
Ø  Query the Windows event logs on a local or remote computer and write the information to a file or variable.
Ø  Obtain information about the presence, state, or properties of hardware components, and then use this information to determine whether other tasks in the control flow should run.
Ø  Get a list of applications and determine what version of each application is installed.

Step by step creating package for WMI data reader

Take WMI data reader task.

Double click on WMI Data reader task. Select WMI operation.

Create WMI connection. Click on new connection.

Write the connection name and description.
If you working on network so you need to provide the user id and there password. Otherwise you can go with Windows authentication. Click on test button.

Click Ok.
Now click on the WQLQuerySourseType. There are three type of WQLQuerySourseType give below.
Ø  Direct Input
Ø  File connection
Ø  Variable

Here I am selecting Direct Input. Click on WQLQuerySource.

I have written WQL Query
SELECT FreeSpace, DeviceID, Size, SystemName, Description FROM Win32_LogicalDisk
With help of this query I want to get the information Logical Disk like FreeSpace, DeviceID, Size, SystemName and Description.
For more details about WQL refer below links:-


Click Ok.
 Select output Type. There are three type of Output Type
Ø  Data Table
Ø  Property name and value
Ø  Property value
I am selecting Data table here.

Select Overwrite Destination. There are three type of Overwrite destination give below.
Ø  Append to destination
Ø  Keep original
Ø  Overwrite destination
According to your requirement you can select the Overwrite destination. Here I am selecting Overwrite Destination.

Select Destination type Either File type or variable. I am selecting File type destination.

Create new Destination where you want to store the information.

Click ok. Now execute the package.

Package executed successfully.
Now I am going to see the txt file where I write the information.



No comments:

Post a Comment

If you have any doubt, please let me know.

Popular Posts