Sunday, November 26, 2017

What is WMI?

Windows Management Instrumentation(WMI) allows you to use API calls to control systems and services on Microsoft Windows 10 (also from Windows XP) through models Win32_LogicalDisk and Win32_Process. You can use WMI to control local and remote machines. WMI is available for all Windows' versions.

Some of the tasks that you can undertake with WMI are,

Start a process on a remote computer.
Schedule a process to run at specific times on specific days.
Reboot a computer remotely.
Get a list of applications installed on a local or remote computer.
Query the Windows event logs on a local or remote computer or multiple computers with a single command.

You access  WMI locally and remotely using the interactive command WMIC in command-line as follows:
----------
C:\>wmic
wmic:root\cli>
-----------
Now you can see what WMI is about using the help flag /? as follows:
----------
wmic:root\cli> /?
[global switches]
The following global switches are available:
/NAMESPACE           Path for the namespace the alias operate against.
/ROLE                Path for the role containing the alias definitions.
/NODE                Servers the alias will operate against.
/IMPLEVEL            Client impersonation level.
/AUTHLEVEL           Client authentication level.
/LOCALE              Language id the client should use.
/PRIVILEGES          Enable or disable all privileges.
/TRACE               Outputs debugging information to stderr.
/RECORD              Logs all input commands and output.
/INTERACTIVE         Sets or resets the interactive mode.
/FAILFAST            Sets or resets the FailFast mode.
/USER                User to be used during the session.
/PASSWORD            Password to be used for session login.
/OUTPUT              Specifies the mode for output redirection.
/APPEND              Specifies the mode for output redirection.
/AGGREGATE           Sets or resets aggregate mode.
/AUTHORITY           Specifies the for the connection.
/?[:]    Usage information.

For more information on a specific global switch, type: switch-name /?

The following alias/es are available in the current role:
ALIAS                    - Access to the aliases available on the local system
Press any key to continue, or press the ESCAPE key to stop

----------
Refer to this source for more information:
https://msdn.microsoft.com/en-us/library/aa384642(v=vs.85).aspx

No comments: