Jump to content

Can't remove Kaspersky VPN via Powershell


Go to solution Solved by Studynx,

Recommended Posts

I want to automate the uninstall and inject that post-install script into my system images

 

$appName = "Kaspersky VPN"

$application = Get-WmiObject -Query "SELECT * FROM Win32_Product WHERE Name LIKE '%$appName%'"


if ($application) {
    $uninstallResult = $application.Uninstall()
    if ($uninstallResult.ReturnValue -eq 0) {
        Write-Output "Kaspersky VPN has been successfully uninstalled."
    } else {
        Write-Output "Failed to uninstall Kaspersky VPN. Error code: $($uninstallResult.ReturnValue)"
    }
} else {
    Write-Output "Kaspersky VPN is not installed or could not be found."
}

 

Link to comment
Share on other sites

  • Solution
On 4/25/2024 at 12:58 PM, harlan4096 said:

Welcome to Kaspersky Community.

 

Please contact the K. Support

I've ended up fixing it by means of another script I wrote. It works. Altho what K.Support gave me for a cmdline code didn't work lmao.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


×
×
  • Create New...