There may be a time when you want to uninstall the Vanta Agent on Windows machines for your organization. The best way to do this is to first deactivate the Vanta Agent on the machine which will remove it from your Vanta instance, and then uninstall the application from the machine. Below is an example PowerShell script that can be run to perform both of these commands.
You will need to update the $VantaSecret variable with your Vanta Key. This is available from the unmonitored tab of the computers page:
PowerShell Script Example:
C:\ProgramData\Vanta\vanta-cli deactivate --secret=$VantaKey
"Unable to Deactivate the Vanta Agent, please reach out to support."
$application = Get-WmiObject -Class Win32_Product -Filter "Name = 'Vanta Agent'"
"Unable to uninstall the Vanta Agent, please reach out to support."
"vanta Agent Successfully Deactivated and Uninstalled"