#!/usr/bin/perl use strict; use warnings; use Win32::EventLog; my $handle = Win32::EventLog->new("Application") or die "Can't open Application EventLog\n"; my $Event = { EventType => EVENTLOG_AUDIT_FAILURE, Category => 'Login', EventID => 5, Data => "Some dummy data", Strings => "This is event is generated by a Test Script", }; $handle->Report($Event);