|
Answer» The aim of the SCRIPT below is to send an email when perfmon on the server meets a certain level.
That in it SELF works but what perfmon can also do is create a record of when it hits that level, what i want to be able to do is attach that log *.blg file to the email that is being created below.
Has anyone come across a way of adding an attachment using script.
Code: [Select]d:
CD D:\Notifications\Scripts\
del W3WPprocess.eml /q
cls ************************************ *Waiting for log file to be written* *********************************** echo off rem PING 1.1.1.1 -n 1 -w 70000 >NUL cls echo on ************************************** *Waiting for email file to be written* ************************************* echo x-sender: [emailprotected] >> W3WPprocess.eml echo x-receiver:[emailprotected] >> W3WPprocess.eml echo x-receiver:[emailprotected] >> W3WPprocess.eml echo x-receiver:[emailprotected] >> W3WPprocess.eml echo x-receiver:[emailprotected] >> W3WPprocess.eml echo From: [emailprotected] >> W3WPprocess.eml echo TO: [emailprotected] >> W3WPprocess.eml REM echo TO: [emailprotected];[emailprotected];[emailprotected];[emailprotected] >> W3WPprocess.eml echo Subject: Web-001 W3WP Process(es) is Hogging processor USE>> W3WPprocess.eml
echo.>> W3WPprocess.eml echo Please Check status of Web-001 (Live WEBSITES) >> W3WPprocess.eml echo.>> W3WPprocess.eml echo W3WP Process(es) is hogging processor use for the last 2 mins at 100%% please check. >> W3WPprocess.eml echo.>> W3WPprocess.eml echo This is an automated email message. >> W3WPprocess.eml echo.>> W3WPprocess.eml echo Thanks >> W3WPprocess.eml echo.>> W3WPprocess.eml echo Web-001 >> W3WPprocess.eml
move W3WPprocess.eml c:\inetpub\mailroot\pickup
|