Install software using a custom client field (Cove)

Written By Mikel from Gorelo

Custom client fields can be used in scripts to install software with client specific info (keys, tokens etc.).

In this example, we'll use Cove Backup by N-Able.

Step 1: Create the client custom field

  1. Navigate to Settings -> CRM-> Custom Fields

  2. Add custom field with the following details

    • Name: Cove Customer UID

    • Variable: CoverCustomerUID

Step 2: Populate the 'Cover Customer UID' for each client

  1. Navigate to a specific Client

  2. Click on Custom Fields

  3. Edit 'Cove Customer UID'

  4. Enter the Customer UID retrieved from Cove

Step 3: Create the script

  1. Navigate to Scripts

  2. Create a script with the following details:

    • Name: βž•Install-Cove

    • Content:

Example
# ================================================================================= $CoveCustomerUID = $gorelo:client.CoveCustomerUID $ProductName = "All-in" # Default retention policy $ProfileID = "0" # Profile ID (use "0" for no profile or a specific profile ID) # ================================================================================= # Validate the required UID is available if ([string]::IsNullOrEmpty($CoveCustomerUID)) { Write-Error "Missing CoveCustomerUID value" exit 1 } # Clean up any whitespace $CoveCustomerUID = $CoveCustomerUID.Trim() Write-Output "Using Cove UID: $CoveCustomerUID" Write-Output "Using Profile: $ProfileID" Write-Output "Using Product: $ProductName" # Download the installer $installPath = "C:\Windows\Temp\backup-manager.exe" [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 $client = New-Object System.Net.WebClient $client.DownloadFile("https://cdn.cloudbackup.management/maxdownloads/mxb-windows-x86_x64.exe", $installPath) # Install Backup Manager with profile and product settings $arguments = "-unattended-mode -silent -partner-uid $CoveCustomerUID -product-name $ProductName" if ($ProfileID -ne "0") { # Only add the profile parameter if a specific profile is requested $arguments += " -profile-id $ProfileID" } Write-Output "Running installer with arguments: $arguments" Start-Process -FilePath $installPath -ArgumentList $arguments -Wait -NoNewWindow # Check if service is running Start-Sleep -Seconds 10 $service = Get-Service -Name "Backup Service Controller" -ErrorAction SilentlyContinue if ($service -and $service.Status -eq "Running") { Write-Output "Installation successful" exit 0 } else { Write-Output "Installation may have failed" exit 1 }