Example of wmic authentication file in Linux

1.Create a file, with the content. username=WindowsUsername password=WindowsPassword domain=DomainNameOrWorkGroup 2. For security, assign the permission 400. Example mkdir /etc/wmic vi /etc/wmic/Win20008.txt chmod 400 /etc/wmic/Windows2008R2srv.txt cat /etc/wmic/Windows2008R2srv.txt username=zabbixmonitor password=SuperPassword domain=WORKGROUP Usage: wmic -A /etc/wmic/Windows2008R2srv.txt //192.168.123.58 “select * from Win32_ComputerSystem”  

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 wget http://www6.atomicorp.com/channels/atomic/centos/7/x86_64/RPMS/wmi-1.3.14-4.el7.art.x86_64.rpm –2019-02-06 18:36:16– http://www6.atomicorp.com/channels/atomic/centos/7/x86_64/RPMS/wmi-1.3.14-4.el7.art.x86_64.rpm Connecting to 10.64.114.5:3128… connected. Leer más