def rule(event):
    if any(
        [
            "Install-WindowsFeature WindowsPowerShellWebAccess"
            in event.deep_get("ScriptBlockText", default=""),
            "Install-PswaWebApplication" in event.deep_get("ScriptBlockText", default=""),
            all(
                [
                    "Add-PswaAuthorizationRule" in event.deep_get("ScriptBlockText", default=""),
                    "-UserName " in event.deep_get("ScriptBlockText", default=""),
                    "-ComputerName " in event.deep_get("ScriptBlockText", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
