it-novum / openitcockpit-agent-go

Cross-Platform Monitoring Agent for openITCOCKPIT written in Go
https://openitcockpit.io/download_agent/
Apache License 2.0
5 stars 2 forks source link

Query event log through PowerShell #45

Closed nook24 closed 3 years ago

nook24 commented 3 years ago
Get-EventLog -LogName Application -After (Get-Date).AddHours(-1)  | ConvertTo-Json -depth 100
Get-EventLog -LogName Application -After (Get-Date).AddHours(-1) | Select-Object Message, Source, TimeGenerated, TimeWritten, Index | ConvertTo-Json -depth 100