Skip to main content

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

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.


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


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


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.


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



Regards


Rob


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


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


Reply