Page 1 of 1

Writing IISAPP.vbs to File

Posted: 30 Jul 2009 02:38
by kcuk
Hello all

Using perfmon I have created an alert that will send an email when a threshold is met. one of the alerts I have created is w3wp.exe so using the IISAPP.VBS script I want to echo the results of this to file for emailing so we can see what site is being affected.

like

Code: Select all

echo iisapp.vbs >> w3wp.txt


resulting in iisapp.vbs just being written instead of

W3WP.exe PID: 7064 AppPoolId: site1
W3WP.exe PID: 14576 AppPoolId: site2
W3WP.exe PID: 17536 AppPoolId: site3
W3WP.exe PID: 4816 AppPoolId: site4

being written to file.

in the code i have tried putting % signs around the iisapp.vbs to see if that works but nadda.

anyone help with this?

Posted: 30 Jul 2009 12:53
by avery_larry
Don't use echo. Just use the > or >> redirection directly (so whatever would normally output on the screen would instead be redirected to a file).

For instance, if your command is ipconfig you would do this:

ipconfig >> myfile.txt

Not sure if that's what you're going for, though.

Posted: 02 Sep 2009 08:40
by lanceaugust31
In that command is whatever would normally output on the screen would instead be redirected to a file...



__________________
Writing jobs