Please refer the script to uninstall ESET Endpoint Antivirus and ESET Remote Administrator Agent.
If you have configured your ESET Endpoint Antivirus Software with a "username" & "password".Provide it with the script
Run this script as "System user".
passwordprotected='0' ## set the value as 1 for password protected in your eset otherwise set the value as 0
password=r'****' #enter your Eset password