Writing IISAPP.vbs to File

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
kcuk
Posts: 1
Joined: 30 Jul 2009 02:24
Location: Bournemouth, UK

Writing IISAPP.vbs to File

#1 Post by kcuk » 30 Jul 2009 02:38

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?

avery_larry
Expert
Posts: 391
Joined: 19 Mar 2009 08:47
Location: Iowa

#2 Post by avery_larry » 30 Jul 2009 12:53

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.

lanceaugust31
Posts: 1
Joined: 02 Sep 2009 07:55

#3 Post by lanceaugust31 » 02 Sep 2009 08:40

In that command is whatever would normally output on the screen would instead be redirected to a file...



__________________
Writing jobs

Post Reply