WMIC has been a built-in command since XP as a interface to WMI operations. Here is a basic task , stop or start the windows service on remote server.
Run WMIC on command prompt, or Run box.
By default, the WMIC connect to local WMI service. If you want to connect to a remote Node.
|/Node:yourremote Server |
enter you password.
|Service List, it will show you all services installed on the server |
If you want to list only those service a running, and list the name caption only (like the sql projection syntax. )
|service where state=”running” get name, caption, status |
get a specified service status, like iisadmin
the same approach applies to the process management.
|process where name=”notepad.exe” call terminate |
close the notepad.exe process
to shutdown the server
terminate the winlogon.exe
Also you can use PSexec to run process on the remote server directly. http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx