-
-
Save p0w3rsh3ll/003a15f06699299427b6966c3d36a52c 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
# There are 434 Query nodes in this XML query | |
([xml]$q).QueryList.Query | Measure | |
# A query with 257 Paths fails | |
Get-WinEvent -FilterXml ( | |
[xml]( | |
'<QueryList><Query>{0}</Query></QueryList>' -f "$( | |
( | |
Select-Xml -Xml ([xml]$q) -XPath '//Query' | | |
Select -First 257 | |
).Node.InnerXML | |
)" | |
) | |
) | |
# A query with 256 Paths succeeds | |
Get-WinEvent -FilterXml ([xml]('<QueryList><Query>{0}</Query></QueryList>'-f "$((Select-Xml -Xml ([xml]$q) -XPath '//Query' | Select -First 256).Node.InnerXML)")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment