NOtification BY Email through SMTPConsumerEvent using MOF
Hi, I need help in Email Notification whenever an event occurs according to the query mentioned it is workign fine with single file copy but when iam copying multiple files it is triggering email for each file copy which i thought keeping group clause could solve but now iam not getting email triggered please find the MOF file below ...I need all the file names in the email message and how could i do the same for remote machines #pragma namespace("\\\\.\\root\\subscription") // 2. Create an instance of __EventFilter class // and use it's Query property to store // your WQL event query. instance of __EventFilter as $EventFilter { Name = "File Copy Filter"; EventNamespace = "Root\\Cimv2"; Query ="SELECT * From __InstanceCreationEvent WITHIN 10 Where TargetInstance ISA 'CIM_DATAFile'AND TargetInstance.Drive='D:'GROUP WITHIN 10"; QueryLanguage = "WQL"; }; // 3. Create an instance of __EventConsumer // derived class. (ActiveScriptEventConsumer // SMTPEventConsumer etc...) instance of SMTPEventConsumer as $Consumer { Name = "File Copy SMTP Consumer"; Message = "A File Named %TargetInstance.FileName% %TargetInstance.extension% Was Copied to Drive %TargetInstance.Drive% Probably a USB Device"; SMTPServer = "team.xyz.com"; Subject = "File Copy to USB on Computer %TargetInstance.CSName%"; ToLine = "USer@xyz.Com"; FromLine = "%TargetInstance.CSName%@xyz.com"; }; // 4. Join the two instances by creating // an instance of __FilterToConsumerBinding // class. instance of __FilterToConsumerBinding { Filter = $EventFilter; Consumer = $Consumer; };
March 8th, 2012 7:35am

Hello, I suggest you post in MOF forum. Microsoft Operations Framework -- MOF 4.0 http://social.technet.microsoft.com/forums/en/MOF4/ Thanks ZHANG
Free Windows Admin Tool Kit Click here and download it now
March 8th, 2012 10:46pm

Thanks Zhang ....
March 8th, 2012 11:09pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics