{
  "version": 1,
  "name": "Remote Agent Update [WIN]",
  "description": "Reaches out to the remote Borealis agent and triggers an automatic unattended update from the Github repository.",
  "category": "script",
  "type": "powershell",
  "script": "W0NtZGxldEJpbmRpbmcoKV0KcGFyYW0oCiAgICBbUGFyYW1ldGVyKCldCiAgICBbc3RyaW5nXSRUYXNrTmFtZSA9ICJCb3JlYWxpcyBBZ2VudCIsCgogICAgW1BhcmFtZXRlcigpXQogICAgW3N0cmluZ10kVGFza1BhdGgKKQoKJHRhc2tQYXJhbXMgPSBAeyBUYXNrTmFtZSA9ICRUYXNrTmFtZTsgRXJyb3JBY3Rpb24gPSAnU3RvcCcgfQppZiAoJFRhc2tQYXRoKSB7ICR0YXNrUGFyYW1zLlRhc2tQYXRoID0gJFRhc2tQYXRoIH0KCnRyeSB7CiAgICAkdGFzayA9IEdldC1TY2hlZHVsZWRUYXNrIEB0YXNrUGFyYW1zCn0gY2F0Y2ggewogICAgdGhyb3cgIlNjaGVkdWxlZCB0YXNrICckVGFza05hbWUnIHdhcyBub3QgZm91bmQuIgp9CgokZXhlY0FjdGlvbiA9ICR0YXNrLkFjdGlvbnMgfCBXaGVyZS1PYmplY3QgeyAkXy5DaW1DbGFzcy5DaW1DbGFzc05hbWUgLWVxICdNU0ZUX1Rhc2tFeGVjQWN0aW9uJyB9IHwgU2VsZWN0LU9iamVjdCAtRmlyc3QgMQppZiAoLW5vdCAkZXhlY0FjdGlvbikgeyB0aHJvdyAiU2NoZWR1bGVkIHRhc2sgJyRUYXNrTmFtZScgZG9lcyBub3QgY29udGFpbiBhbiBleGVjdXRhYmxlIGFjdGlvbi4iIH0KCiR3b3JraW5nRGlyZWN0b3J5ID0gJGV4ZWNBY3Rpb24uV29ya2luZ0RpcmVjdG9yeQppZiAoW3N0cmluZ106OklzTnVsbE9yV2hpdGVTcGFjZSgkd29ya2luZ0RpcmVjdG9yeSkpIHsKICAgICRjYW5kaWRhdGUgPSBTcGxpdC1QYXRoIC1QYXRoICRleGVjQWN0aW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XRpb24gJHJlcG9Sb290CiR1cGRhdGVTdWNjZWVkZWQgPSAkZmFsc2UKdHJ5IHsKICAgICYgJHVwZGF0ZVNjcmlwdAogICAgJHVwZGF0ZVN1Y2NlZWRlZCA9ICQ/Cn0gZmluYWxseSB7CiAgICBQb3AtTG9jYXRpb24KfQoKaWYgKC1ub3QgJHVwZGF0ZVN1Y2NlZWRlZCkgewogICAgdGhyb3cgJ1VwZGF0ZS5wczEgVXBkYXRlIEZhaWxlZC4nCn0=",
  "timeout_seconds": 3600,
  "sites": {
    "mode": "all",
    "values": []
  },
  "variables": [],
  "files": [],
  "script_encoding": "base64"
}