def rule(event):
    if all(
        [
            "powershell" in event.deep_get("ScriptBlockText", default=""),
            "WindowStyle" in event.deep_get("ScriptBlockText", default=""),
            "Hidden" in event.deep_get("ScriptBlockText", default=""),
            not all(
                [
                    ":\\Program Files\\Amazon\\WorkSpacesConfig\\Scripts\\"
                    in event.deep_get("ScriptBlockText", default=""),
                    "$PSScriptRoot\\Module\\WorkspaceScriptModule\\WorkspaceScriptModule"
                    in event.deep_get("ScriptBlockText", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
