def rule(event):
    if all(
        [
            any(
                [
                    any(
                        [
                            event.deep_get("Image", default="").endswith("\\powershell.exe"),
                            event.deep_get("Image", default="").endswith("\\powershell_ise.exe"),
                            event.deep_get("Image", default="").endswith("\\pwsh.exe"),
                        ]
                    ),
                    event.deep_get("OriginalFileName", default="")
                    in ["PowerShell.Exe", "pwsh.dll"],
                ]
            ),
            any(
                [
                    "Add-AADInt" in event.deep_get("CommandLine", default=""),
                    "ConvertTo-AADInt" in event.deep_get("CommandLine", default=""),
                    "Disable-AADInt" in event.deep_get("CommandLine", default=""),
                    "Enable-AADInt" in event.deep_get("CommandLine", default=""),
                    "Export-AADInt" in event.deep_get("CommandLine", default=""),
                    "Find-AADInt" in event.deep_get("CommandLine", default=""),
                    "Get-AADInt" in event.deep_get("CommandLine", default=""),
                    "Grant-AADInt" in event.deep_get("CommandLine", default=""),
                    "Initialize-AADInt" in event.deep_get("CommandLine", default=""),
                    "Install-AADInt" in event.deep_get("CommandLine", default=""),
                    "Invoke-AADInt" in event.deep_get("CommandLine", default=""),
                    "Join-AADInt" in event.deep_get("CommandLine", default=""),
                    "New-AADInt" in event.deep_get("CommandLine", default=""),
                    "Open-AADInt" in event.deep_get("CommandLine", default=""),
                    "Read-AADInt" in event.deep_get("CommandLine", default=""),
                    "Register-AADInt" in event.deep_get("CommandLine", default=""),
                    "Remove-AADInt" in event.deep_get("CommandLine", default=""),
                    "Reset-AADInt" in event.deep_get("CommandLine", default=""),
                    "Resolve-AADInt" in event.deep_get("CommandLine", default=""),
                    "Restore-AADInt" in event.deep_get("CommandLine", default=""),
                    "Save-AADInt" in event.deep_get("CommandLine", default=""),
                    "Search-AADInt" in event.deep_get("CommandLine", default=""),
                    "Send-AADInt" in event.deep_get("CommandLine", default=""),
                    "Set-AADInt" in event.deep_get("CommandLine", default=""),
                    "Start-AADInt" in event.deep_get("CommandLine", default=""),
                    "Unprotect-AADInt" in event.deep_get("CommandLine", default=""),
                    "Update-AADInt" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
