"Mike 'Spike' Lovell" <> wrote in
message news:...
>> I have a batch file that runs a WMI command to do an IIS Reset on a
>> remote machine. When it's doing it, I want it to log the date/time that
>> the reset is done, but I'm having trouble getting it to work. Probably
>> an issue with my syntax. Here is my code:
>>
>> wmic /node:"sup24app01" process call create "cmd /k date /t >
>> c:\maintenance\iis_reset_log.txt
>> wmic /node:"sup24app01" process call create "cmd /k iisreset
>>
>> I'm not sure what I'm doing wrong, but the file doesn't get created
>> and, all I want is to append the date/time stamp within the contencts of
>> the file.
>
> date will wait for user input,
not when used with the "/T" switch.
> you can do this:
>
> echo %date% %time% >> <filename>
Yes, he can do that - assuming he wants to log the date and time locally,
and wants the local time to be the time that is used. I thought he was
running the command remotely in order to have the remote time logged.
/Al
|