Hi,
I have a batch file on a server1111 which is executing a Powershell script file for restarting PatrolAgent service of a remote server.
--- Service is successfully started ---- Now I need to check the connectivity of the Agent. (This can be checked by logging into 'MAINSERVER' and running a command in cmd)
Now the requirement is to Get into that server remotely through script and run that command through the cmd of that remote server.
(Solution can be from done from anyone... ) may from batch file which I am running or from the script file which is executed by the batch.
NOTE: The command executed in the cmd of 'MAINSERVER' server need a server name to be entered of which which will get connectivity info...
I Tried in batch (WMIC /NODE:MAINSERVER "cd c:\abc", "getinfo.cmd agent info SERVER2222") but got error "INVALID GLOBAL SWITCH"
In Actual we do (Login into 'MAINSERVER' open cmd -> cd c:\abc -> getinfo agent info SERVER2222)