import re


def rule(event):
    if any(
        [
            re.match(
                r"^.*\\WindowsPowerShell\\Modules\\.*\\.ps$",
                event.deep_get("TargetFilename", default=""),
            ),
            re.match(
                r"^.*\\WindowsPowerShell\\Modules\\.*\\.dll$",
                event.deep_get("TargetFilename", default=""),
            ),
        ]
    ):
        return True
    return False
