Table of Contents

WMI - wmic

Syntax: " wmic -U domain/user%password //host "<query>" "

Preface

WMIC in our case it will be Linux WMI client, as MS Windows has application called with similar name wmic.exe . It is WMI client application that is using ExecQuery WMI method for requesting data from remote MS Windows server.

As you can see I have used SQL like syntax for getting the interesting data:

“select caption, name, parentprocessid, processid from win32_process”

As well I was not going to print all object (caption, name, parentprocessid, processed) of the class (win32_process) only the interesting objects.

WMIC - ExecQuery Error codes

In the case that you are going to use WMIC (with help of ExecQuer on MS Windows site) it is any time really handy to have the possibility to test your query if it is wailed. In our case WMIC is providing error code in cause of failure.