Jump to content

Scripted mass uninstall of ESET Agent/Endpoint protection


Recommended Posts

Posted

Hi Guys, 

I'm trying to create a powershell script to uninstall the product because using the eset remote administrator is a bit flakey over our vpn. 

I've tried 

$uninstall64 = gci "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" | foreach { gp $_.PSPath } | ? { $_ -match "ESET Management Agent" } | select UninstallString

if ($uninstall64) {
$uninstall64 = $uninstall64.UninstallString -Replace "msiexec.exe","" -Replace "/I","" -Replace "/X",""
$uninstall64 = $uninstall64.Trim()
Write "Uninstalling..."
start-process "msiexec.exe" -arg "/X $uninstall64 /norestart" -Wait}

 

this works but it runs and says it failed due to not possible to stop the Agent Management Service, when I go into services.msc I cannot start or stop the service either. 

 

$application = Get-WmiObject -Class Win32_Product -Filter "Name = 'ESET Management Agent'"
$application.Uninstall()

 

__GENUS          : 2
__CLASS          : __PARAMETERS
__SUPERCLASS     : 
__DYNASTY        : __PARAMETERS
__RELPATH        : 
__PROPERTY_COUNT : 1
__DERIVATION     : {}
__SERVER         : 
__NAMESPACE      : 
__PATH           : 
ReturnValue      : 1603
PSComputerName   : 

 

Are you able to provide some advice, is there a way to stop the protection so it uninstalls? or different command

 

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...