How to execute .cmd file on a remote machine using WMI?
I need to execute a .cmd batch file on a remote machine using WMIC. I cannot use SSH or PowerShell. I tried executing the code below and following was printed on console: C:\>WMIC /node:"remote-server01" process call create "cmd.exe /c C:\test.cmd" Executing (Win32_Process)->Create() Method execution successful. Out Parameters: instance of __PARAMETERS { ReturnValue = 0; }; However, nothing is executed on the remote machine.
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.