Q:

WMI Process Call Create will not Run Batch script properately

This is what i am trying to do:
I have a NLB Cluster. There are two machines on said cluster: Node1 and Node2.
I have a third machine that is not in that, or any, cluster. This third machine is called: Monitor1
Once every hour, i would like to run a script to check if Node1 and Node2 are up.
This script will be run via TaskScheduler.
I am using the following command to execute the script on Node1 and Node2:
wmic /node:NODE1,NODE2 process call create "C:\ClusterCheck.bat"

The contents of the ClusterCheck.bat script is as follows:
NLB Query | findstr /i /R /C:"host . is stopped"
IF %ERRORLEVEL% EQU 0 (ECHO %COMPUTERNAME%_down)>DOWN.txt
IF %ERRORLEVEL% EQU 1 (ECHO %COMPUTERNAME%_up)>UP.txt
code here

When I use wmic /node:"%1" process call create "C:\ClusterCheck.bat" there is not output.
When I go into the server and manually double click the ClusterCheck.bat file, it gives me the appropriate output depending whether the node is up or down.
Does anyone have any ideas how I can get those files to output?

A:

First problem, when you wmic process call create you should use prefix your command with cmd /c.
Next, you're right.  wmic doesn't display the resulting output of the remotely created process on your local console.  You'll either need to use psexec which was designed for this sort of thing, or hack a workaround by piping the command output to a log file then reading the log file.  Something like the following script.
I'm not really clear, if this is going to be a scheduled task, why you're concerned with results being available to stdout.  I suspect you intend to redirect the output to a log of some sort.  So I put that in here as well.
@echo off
setlocal

set "user=domainadmin"
set "pass=password"

for /f %%I in ('wmic os get localdatetime') do set "timestamp=%%I"
set "today=%timestamp:~0,8%"

set logfile=c:\users\me\Desktop\logs\%today%.log

if not exist "%logfile%" mkdir "%logfile%\.." 2>NUL
>>"%logfile%" echo %time%

for %%I in (NODE1 NODE2) do (
    (ping -n 1 %%I >NUL && (
        net use \\%%I /user:%user% %pass% >NUL 2>NUL
        wmic /node:%%I /user:%user% /password:%pass% process call create "cmd /c c:\clustercheck.bat >c:\cc.log"
        type \\%%I\c$\cc.log && del \\%%I\c$\cc.log
        net use \\%%I /delete >NUL 2>NUL
    ) || echo %%I unresponsive
)>>"%logfile%"

forfiles /p "%logfile%\.." /M *.log  /d -30 /c "cmd /c del @path"

This should create Desktop\logs if it doesn't exist, then create or append to Desktop\logs\YYYYMMDD.log the output of C:\clustercheck.bat run on NODE1 and NODE2.  Finally, it deletes log files that are over 30 days old.

