Install wmi in CentOS

Problem:

It is necessary to query Windows servers from Linux using Windows Management Instrumentation (WMI).

Solution:

 
Install the wmi client in Linux, follow these steps

1. Download wmi from  www.atomicorp.com

 

2. Install wmi using yum:

 

3. Test it

 

 

Usage:

wmic -U user%password //host “query”

Example:

Remotely obtain the RAM of the Windows server:

Windows srver IP: 192.168.123.58
Windows Username: zabbixmonitor
Windows password: SuperPassword