# Adopt this PC's RustDesk into help.jebit.services: point it at the server and, with an enrollment # token, assign it in the CortenDesk console. Installs the official RustDesk first if it's # missing. An existing permanent password is left as it is. # # In PowerShell, run as Administrator: # irm https://help.jebit.services/adopt.ps1 | iex # # It asks for an enrollment token (Enter skips; the user can then claim the device by signing # in to the console from RustDesk). For RMM tools: set CORTENDESK_ENROLL_TOKEN, and download # https://help.jebit.services/Install-Helpdesk.ps1 to pass -EnrollUser, -DeviceGroup, -Strategy and so on. & { $ErrorActionPreference = 'Stop' [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 $principal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent()) if (-not $principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) { Write-Host 'Run PowerShell as Administrator, then: irm https://help.jebit.services/adopt.ps1 | iex' -ForegroundColor Yellow return } # The tested installer does the work: install if missing, apply the server, enroll. $installer = (Invoke-WebRequest -UseBasicParsing -Uri 'https://help.jebit.services/Install-Helpdesk.ps1').Content if ($installer -is [byte[]]) { $installer = [Text.Encoding]::UTF8.GetString($installer) } & ([scriptblock]::Create($installer)) -ConfigString 'Qfi0TViZUSIVkY2xkbK5GeilWOZZ0K1gXd0kVWHlTSk5EM49WOUFFVmZFUYZmMiojI5V2aiwiIzV2YpZnclNnL0lmYlpmLwxWZo9yL6MHc0RHaiojIpBXYiwiIiojI5FGblJnIsIyclNWa2JXZz5CdpJWZq5CcsVGaiojI0N3boJye' -PromptEnrollToken }