def rule(event):
    if all(
        [
            "Test-NetConnection" in event.deep_get("ScriptBlockText", default=""),
            "-ComputerName " in event.deep_get("ScriptBlockText", default=""),
            "-port " in event.deep_get("ScriptBlockText", default=""),
            not any(
                [
                    " 443 " in event.deep_get("ScriptBlockText", default=""),
                    " 80 " in event.deep_get("ScriptBlockText", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
