The scenario is fictional . PowerShell and events come from the book (untested on Windows). Only the path-matching logic was tested, in Python, on synthetic strings.