Skip to main content
All CollectionsPlatformGeneral - Platform
How to Offboard Liongard Environments
How to Offboard Liongard Environments
Updated this week

Overview: This article provides the steps required to offboard an environment from the Liongard platform. Offboarding is a critical process to ensure that all data and agents associated with the environment are properly removed to maintain security and cleanliness of your systems.

Steps to Offboard an Environment:

  1. Delete the Environment:

    • Navigate to Admin > Environments.

    • Locate the environment you wish to delete.

    • Click on the red trashcan icon next to the environment.

    • Follow the prompts to confirm the deletion.

  2. Important: Deleting an Environment will delete all associated inspectors and agents, All the historical data/information will be deleted. This action cannot be undone.

  3. Unlink/Remove Mappings:

    • Go to your Liongard integration settings.

    • Remove or unlink any mappings associated with the environment. This may include API integrations, credential mappings, or other configuration settings that were specific to the offboarded environment.

  4. Uninstall Liongard Agents:

    • Manually uninstall the Liongard Agents from the devices on your customer's network. Ensure that the uninstallation process removes all components related to the agents to prevent any orphaned services or data.

    • Optionally, use the script listed below to automate this process by leveraging your RMM platform, or Group Policy:

Click here to expand the script

#Application variables
$application = Get-WmiObject -Class Win32_Product -Filter "Name = 'Liongard Agent'"
$application2 = Get-WmiObject -Class Win32_Product -Filter "Name = 'RoarAgent'"

# Check and run as Administrator
If (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
Write-Warning "You do not have Administrator rights to run this script. Please rerun this script as an Administrator!"
Exit
}

# Uninstall installations if found
if ($application) {
Write-Host "A recent version of the Liongard Agent was found! Uninstalling..."
$result = $application.Uninstall()
Write-Host "Uninstall result: $($result.ReturnValue)"
if ($result.ReturnValue -eq 0) {
Write-Host "Liongard Agent has been successfully uninstalled."
} else {
Write-Host "Failed to uninstall Liongard Agent. Error code: $($result.ReturnValue)"
}
} elseif ($application2) {
Write-Host "An old version of RoarAgent was found. Uninstalling..."
$result2 = $application2.Uninstall()
Write-Host "Uninstall result: $($result2.ReturnValue)"
if ($result2.ReturnValue -eq 0) {
Write-Host "RoarAgent has been successfully uninstalled."
} else {
Write-Host "Failed to uninstall RoarAgent. Error code: $($result2.ReturnValue)"
}
} else {
Write-Host "No Liongard Agent installation was found."
}

# Wait for 10 seconds to ensure the uninstall processes complete
Start-Sleep -Seconds 10

# Check for any remaining services and remove them
$serviceName = "roaragent.exe" # Corrected service name
$service = Get-Service -Name $serviceName -ErrorAction SilentlyContinue
if ($service) {
Stop-Service -Name $serviceName -Force
Write-Host "Service $serviceName stopped."
sc.exe delete $serviceName
Write-Host "Service $serviceName removed."
} else {
Write-Host "No service named $serviceName found to remove."
}

# Clean up residual files
$agentPath = "C:\Program Files (x86)\LiongardInc" # Updated installation folder path
if (Test-Path $agentPath) {
Remove-Item -Path $agentPath -Recurse -Force
Write-Host "Removed residual Liongard Agent files from $agentPath."
} else {
Write-Host "No residual files found to remove at $agentPath."
}

Final Checks: After completing these steps, perform a final check to ensure that all data related to the environment has been completely removed from your systems and from Liongard. This includes verifying that no residual data remains in your Liongard instance and checking that all scheduled tasks or services related to the agents are removed.

By following these instructions, you can safely and thoroughly offboard environments from the Liongard platform.

Did this answer your question?