Created
March 9, 2022 19:40
-
-
Save LeeHolmes/c5f9be64788a139073744abba5ab4352 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Event | |
| where EventID == "4104" | |
| extend ParsedEvent = parse_xml(strcat("<root>", ParameterXml, "</root>")) | |
| extend MessageNumber = tolong(ParsedEvent.root.Param[0]) | |
| extend MessageTotal = tolong(ParsedEvent.root.Param[1]) | |
| extend ScriptBlockElement = iff( | |
strlen(tostring(ParsedEvent.root.Param[2]["#text"])) > 0, | |
ParsedEvent.root.Param[2]["#text"], | |
ParsedEvent.root.Param[2]) | |
| extend ScriptBlockId = tostring(ParsedEvent.root.Param[3]) | |
| extend Path = ParsedEvent.root.Param[4] | |
| order by MessageNumber asc | |
| summarize TimeGenerated = min(TimeGenerated), | |
Path = take_any(Path), ScriptBlockText = strcat_array(make_list(tostring(ScriptBlockElement)), "") by ScriptBlockId |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment