nagaraja wrote: |
Hi,
in which way WMI scripting can help me with email sending? Do i need to check scheduled task status? report txt file parsing? something else?
Thanks a lot |
I'm sorry, I was wrong. What you need is CDO, not WMI. I'm not a script specialist, but i found an example of how to send an email using VBScript here: https://www.paulsadowski.com/WSH/cdo.htm https://www.paulsadowski.com/WSH/cdo.htm.
Roughly what you would need to do in the script is:
1. Start clamscan (save the report with --log parameter)
2. Check the return code of clamscan (see the documentation on clamav.net)
3. If viruses are detected (the return code will tell you this), send an email using the example in the link above. You can use the scan log file as email body.
I do not have the time to create the script for you now. If you do find the solution, please consider to publish it here (in the tutorials section). It might be usable for others too.
regards,
Peter