How To Uninstall Syncro Agent With PowerShell

How To Uninstall Syncro Agent with PowerShell

Discover how to efficiently uninstall Syncro Agent with PowerShell, automating service cessation and software removal seamlessly.

Introduction

In today’s dynamic IT environments, software installation and removal are constant occurrences. Efficient management of this process becomes vital, particularly for Managed Service Providers (MSPs). Amongst numerous software utilities that MSPs handle, SyncroMSP and Splashtop are of significant use. This article will explain how to create a PowerShell script that can stop relevant services and remove these applications seamlessly.

PowerShell: A Powerful Tool for MSPs

PowerShell, an object-oriented scripting language built on .NET, has become a go-to tool for IT admins and MSPs. Its ability to interact with Windows Management Instrumentation (WMI) classes and invoke system-wide changes makes it powerful. Thus, it’s well-suited for tasks like software installation or removal. For our purpose, we will be crafting a PowerShell script that can uninstall SyncroMSP and Splashtop.

Uninstalling SyncroMSP and Splashtop

Uninstalling applications like SyncroMSP and Splashtop can be tricky due to the multiple services they run, including Syncro, SyncroLive, SyncroRecovery, Splashtop Remote Service, and Splashtop Software Updater. Manually stopping these services and removing the applications can be time-consuming and error-prone. This is where our PowerShell script comes in.

Syncro Logo

Crafting the PowerShell Script

The script will first define the list of services and program names associated with SyncroMSP and Splashtop that need to be stopped and removed. It will then cycle through the services and stop them if they are running. After the services are halted, the script will check if the programs are installed and then proceed with their uninstallation.

We leverage the Get-Service cmdlet to identify running services and the Stop-Service cmdlet to halt them. To check if a program is installed and uninstall it, we utilize the Get-WmiObject cmdlet to interact with the Win32_Product WMI class. The Uninstall method provided by this class allows us to remove the application.

Here is the script:

# Define the services and program names
$services = @("Syncro", "SyncroLive", "SyncroRecovery", "Splashtop Remote Service", "Splashtop Software Updater")
$programNames = @("Syncro", "Splashtop")

# Stop the services if they're running
foreach ($serviceName in $services) {
    $service = Get-Service -Name $serviceName -ErrorAction SilentlyContinue
    if ($null -ne $service) {
        Write-Host "Stopping service $serviceName"
        Stop-Service -Name $serviceName -Force
    } else {
        Write-Host "Service $serviceName not found"
    }
}

# Check if the programs are installed and uninstall them
foreach ($programName in $programNames) {
    $program = Get-WmiObject -Query "Select * from Win32_Product Where (Name like '%$programName%')"
    if ($program -ne $null) {
        Write-Host "Uninstalling program $programName"
        $program.Uninstall() | Out-Null
    } else {
        Write-Host "Program $programName not found"
    }
}

Conclusion: Maximizing Efficiency with PowerShell

This PowerShell script is a clear example of how you can leverage the power of this scripting language to maximize efficiency in managing software on Windows systems. By creating an automated process for stopping services and uninstalling applications, you can save significant time and reduce the potential for human error.


Discover more from Patrick Domingues

Subscribe to get the latest posts to your email.

author avatar
Patrick Domingues

Leave a Comment

Stay Informed

Receive instant notifications when new content is released.