replied on August 31, 2020
Hi Lucas-
I just figured out how to do automated emails from events, which would probably work for you with regards to the license issue. The gist:
- Task Scheduler can be set up to trigger an action based on an event. You can set it to monitor the LF Server node in Event Viewer and then limit to specific IDs (you'll see the ID of the license issue in the Event Log).
- Task scheduler launches PowerShell as the command, then points to a .ps1 script as the argument.
- Your PS script will grab the most recent event from a specific Event Viewer node and can also be limited to just the ID number mentioned in point 1. The details are then sent through SMTP.
- In order to not get spammed, I put a "pause" at the end of my script to wait 15 minutes, and then on the Task Scheduler settings said that if an existing task is still running, don't do anything.
I learned this all from Google so that I could set up alerts for Import Agent.
Task Scheduler Action:

PowerShell script:
$A = Get-WinEvent -MaxEvents 1 -FilterHashTable @{Logname = "Laserfiche-ImportAgent-Service/Admin"}
$Message = $A.Message
$EventID = $A.Id
$MachineName = $A.MachineName
$Source = $A.ProviderName
$EmailFrom = "SENDADDRESS@domain.com"
$EmailTo = "TOADDRESS@domain.com"
$Subject ="Alert From $MachineName"
$Body = "EventID: $EventID`nSource: $Source`nMachineName: $MachineName `nMessage: $Message"
$SMTPServer = "YOURSMTPSERVER.domain.com"
$SMTPClient = New-Object Net.Mail.SmtpClient($SmtpServer, 25)
$SMTPClient.Send($EmailFrom, $EmailTo, $Subject, $Body)
Start-Sleep -s 900