Purpose:Run WMI methods on a local or remote machine.

 

Format:WMIRUN [/=] /USER=user /PASSWORD=password /CLASS=classname /METHOD=methodname networkresource command

 

/USER=username

/PASSWORD=password

/CLASS=classname

/METHOD=methodname

networkresource

command

 

Usage:

 

You must be running in an elevated session.

 

Example:

 

This command terminates process 26568 on the local machine:

 

WMIRUN /method=Terminate /class=Win32_Process "\\.\root\CIMV2" Win32_Process.Handle="26568"

 

Options:

 

/=Display the WMI command dialog to help you set the command line options. The /= option can be anywhere on the line; additional options will set the appropriate fields in the command dialog.

 

/USERThe user name to use for remote queries

 

/PASSWORDThe password to use for remote queries

 

/CLASSThe WMI class name

 

/METHODThe WMI method name

 

networkresourceWMI namespace. The namespace argument for remote servers will look something like "\\remote-server\root\cimv2" (substitute your server name for "remote-server").

 

command The command you want WMI to run.