AEM CentraStage Event Result Script

Hi, 

We are using AEM CentraStage Monitoring as an monitoring tool. With this monitoring program we are trying to create e-mail notifications of the event log. 

To create the e-mail notifications we need to create an custom component. For the custom component we have written the following PowerShell script:

$Event = Get-WinEvent -FilterHashtable @{logname='Microsoft-Windows-Backup'; id=4,5,8,9,19,49;StartTime=(Get-Date).AddMinutes(-2015)} -MaxEvents 1 -ErrorAction SilentlyContinue | format-list

If ($Event -eq $null)
	{ Exit 0 } #No events logged
Else
{ 
Write-Host "<-Start Result->"
Write-Host "Result="($Event | Format-Table | Out-String)
Write-Host "<-End Result->"
Exit 1
}

But when we receive an e-mail notificiaton, the e-mail is empty
Like this: 

I have tried different variation in the script like removing the  format-list Command, but then we receive an e-mail notification with errors.

Like this


Can somebody help me out, Because i don't have enoug knowledge to resolve this problem on my own. 

Kind regard,
Francois Meulenberg


  • Edited by Francois013 Tuesday, September 01, 2015 8:42 AM wrong names
September 1st, 2015 8:40am

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

Other recent topics Other recent topics