AutomoxAutomox

Uninstall Ivanti LanDesk

mscro
September 11, 2020 at 5:17 pm UTC

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:

powershell18 lines
$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:

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

This discussion is archived and closed to replies. Continue it in the Automox Community Slack.

Discuss on Slack

Replies (7)

djdink828December 18, 2020
#1

I have a question about the Ivanti uninstall worklet. Will the machines remain in the Ivanti console or will they eventually drop off automatically? Will they need to be manually removed? It would be great if they were removed from the Ivanti console automatically to make it easier to track the Automox install progress.

mscroDecember 18, 2020
#2

Hi Dave

In our case there was a slight delay, it’s based on the console setting
Configure>Services>Inventory>Days to Keep Inventory Scans …

djdink828December 18, 2020
#3

Thanks Mark…one more question: On most PC’s your script works fine but it does leave some remnants behind…a LANDesk directory with a few files. It seems when I run the UnInstallWinClient.exe manually on a PC, it reboots without prompting but all LANDesk related directories are deleted. Just wanted to know if you seen any anomalies when you did your uninstall or could offer me any advice when using your script. Thanks again.

Dave

mscroDecember 18, 2020
#4

I believe the documentation mentioned how to clean up the remaining bits and pieces. We just left them. If you are running manually from a cmd line, add the noreboot switch.

ToombstoneDecember 24, 2020
#5

The /forceclean switch is a really good one for completely cleaning up the agent.

Regards
Rob

djdink828December 30, 2020
#6

Rob–Thanks for this additional info. Yes, the forceclean switch did the trick. The only thing I am worried about is that the documentation indicates that it will uninstall everything including DLL’s that may be shared with other programs. Although I think there is a very unlikely chance that would impact our environment, I wanted to know if you ran into any issues?

Thanks,
Dave

ToombstoneDecember 31, 2020
#7

Hi Dave, I’ve probably performed the uninstall on probably 10,000 devices over the years without a single issue. It does however leave the Device ID in the registry (2 places) just in case you decide to reinstall the agent.

Cheers and Merry Christmas
Rob