def rule(event):
    if any(
        [
            all(
                [
                    any(
                        [
                            event.deep_get("Image", default="").endswith("\\powershell.exe"),
                            event.deep_get("Image", default="").endswith("\\pwsh.exe"),
                        ]
                    ),
                    "Pester" in event.deep_get("CommandLine", default=""),
                    "Get-Help" in event.deep_get("CommandLine", default=""),
                ]
            ),
            all(
                [
                    event.deep_get("Image", default="").endswith("\\cmd.exe"),
                    "pester" in event.deep_get("CommandLine", default=""),
                    ";" in event.deep_get("CommandLine", default=""),
                    any(
                        [
                            "help" in event.deep_get("CommandLine", default=""),
                            "\\?" in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
