def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("ParentImage", default="").endswith("\\powershell.exe"),
                    event.deep_get("ParentImage", default="").endswith("\\pwsh.exe"),
                ]
            ),
            "\\WindowsPowerShell\\Modules\\Pester\\"
            in event.deep_get("ParentCommandLine", default=""),
            any(
                [
                    "{ Invoke-Pester -EnableExit ;"
                    in event.deep_get("ParentCommandLine", default=""),
                    '{ Get-Help "' in event.deep_get("ParentCommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
