Written By Mikel from Gorelo
Navigate to Scripts
Create a script with the following details:
Name: โInstall-Slide
Content:
Example# Download the Slide installer
Write-Output "Downloading Slide installer..."
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$client = New-Object System.Net.WebClient
$client.DownloadFile("https://slide.tech/agent", "C:\Windows\Temp\SlideAgent.exe")
# Install Slide agent silently
Write-Output "Installing Slide agent silently..."
Start-Process -FilePath "C:\Windows\Temp\SlideAgent.exe" -ArgumentList "/S" -Wait -NoNewWindow
# Wait a moment for the installation to complete
Start-Sleep -Seconds 10
# Check if the installation was successful
if (Test-Path "C:\Program Files\Slide\Agent\SlideAgent.exe") {
Write-Output "Slide agent installed successfully"
# Retrieve the pairing code and clean up ANSI color codes
Write-Output "Retrieving pairing information:"
$infoOutput = & "C:\Program Files\Slide\Agent\SlideAgent.exe" info
# Extract just the pairing code line and remove ANSI color codes
$pairingLine = $infoOutput | Where-Object { $_ -match "Pairing Code" }
if ($pairingLine) {
# Remove ANSI color codes and extract just the code
$pairingCode = $pairingLine -replace '\x1B\[[0-9;]*[a-zA-Z]', '' -replace '.*\|\s*', ''
Write-Output "Pairing Code: $pairingCode"
} else {
# If we can't find the specific line, just display all output without color codes
$cleanOutput = $infoOutput -replace '\x1B\[[0-9;]*[a-zA-Z]', ''
Write-Output $cleanOutput
}
exit 0
} else {
Write-Output "Installation may have failed - SlideAgent.exe not found"
exit 1
}
Run the script against an asset youโd like to backup
Use the Pairing Code via https://console.slide.tech/agents