run-splashtop-sos.ps1

<#PSScriptInfo
.VERSION 1.0.0
.GUID c9153e14-344d-4056-b0de-55788312fd1a
.AUTHOR IT Solver
.COMPANYNAME IT Solver
.COPYRIGHT Copyright (c) 2025 IT Solver. All rights reserved.
.DESCRIPTION Downloads and launches IT Solver's remote support tool (SplashtopSOS) for remote assistance sessions
.TAGS Support Remote SplashtopSOS
.LICENSEURI https://github.com/itsolver/gsuitedev/blob/master/LICENSE
.PROJECTURI https://github.com/itsolver/gsuitedev
.ICONURI
.EXTERNALMODULEDEPENDENCIES
.REQUIREDSCRIPTS
.EXTERNALSCRIPTDEPENDENCIES
.RELEASENOTES Initial release of IT Solver remote support tool downloader
.PRIVATEDATA
#>


<#
.SYNOPSIS
Downloads and launches IT Solver's remote support tool (SplashtopSOS)
 
.DESCRIPTION
This script downloads the latest SplashtopSOS executable from IT Solver's GitHub repository and launches it for remote support sessions. The tool allows IT Solver technicians to provide remote assistance to clients.
Aimed at running in this in Windows OOBE.
 
.EXAMPLE
.\run-splashtop-sos.ps1
Downloads and launches the SplashtopSOS tool, displaying a 9-digit code for the technician.
 
.NOTES
Requires internet connection to download the support tool from GitHub.
The downloaded executable is saved temporarily and launched automatically.
#>


function Invoke-ITsomeverSupport {
    [CmdletBinding()]
    param()

    # Static download URL from the GitHub repo
    $sosUrl = "https://github.com/itsolver/public-toolkit/raw/refs/heads/main/splashtop/SplashtopSOS_Win_v3.7.4.4_SWW243AXSJJZ.exe"
    
    # Define where to save the file
    $tempPath = $env:TEMP
    $fileName = "ITsomeverSOS.exe"
    $fullPath = Join-Path $tempPath $fileName

    Write-Host "Downloading IT Solver remote support tool from GitHub..."

    try {
        # Download the file. UseBasicParsing is important for compatibility.
        Invoke-WebRequest -Uri $sosUrl -OutFile $fullPath -UseBasicParsing
        Write-Host "Download complete." -ForegroundColor Green
    }
    catch {
        Write-Error "Download failed. This could be due to the Content-Type issue with GitHub raw links."
        Write-Error "Details: $($_.Exception.Message)"
        return # Stop if download fails
    }

    Write-Host "Launching support tool. Please provide the 9-digit code to your technician."

    try {
        # Run the downloaded executable
        Start-Process -FilePath $fullPath
    }
    catch {
        Write-Error "Failed to launch the downloaded tool."
        Write-Error "Details: $($_.Exception.Message)"
    }
}

# Run the function
Invoke-ITsomeverSupport