Uninstall Ivanti LanDesk

When we first deployed Automox, we decided to create our first Worklet to remove our old patch solution Ivanti Landesk as a way to learn how to use Worklets. Don’t forget to upload the uninstall file UninstallWinClient.exe

Evaluation Code:

$exe = 'UninstallWinClient.exe'

if ((Test-Path $exe) -eq $true)
    {Remove-Item $exe
}


#Remove-Item UninstallWinClient.exe

$FilePath = 'C:\Program Files (x86)\LANDesk\LDClient\vulscan.exe'
$eval = test-path -Path $FilePath

if ( $eval -eq $true )
    {exit 1
    }
else
{exit 0
}

Remediation code:

.\UninstallWinClient.exe /NOREBOOT #-Wait -Passthru .ExitCode