In UIPath Studio, I am trying to use the Invoke PowerShell activity to extract some filtered event logs as a .evtx file. My command is:
wevtutil epl Application C:\Users\moranj\Downloads\WindowsLogExtract\Data\Output\2023-02-07-eventviewer.evtx"/q:*[System[TimeCreated[@SystemTime>='2023-02-05T00:00:00' and @SystemTime<'2023-02-07T00:09:55'] and (Level=4)]]"
This should produce an evtx file with over 200 Information logs, but the file has 0! Bizarrely, when I use different filters, it will sometimes produce some but not all logs. For example, I tried filtering to get Error Logs over a timeframe of 2 days; it should have retrieved 3 error logs, but only got one of them. What is going wrong here?
(Note that while I did run this within UiPath Studio, I have already received help on the UiPath Forums, and have confirmed that nothing is wrong on the UiPath side of things)