To install the Vanta Agent via Powershell you would first run this command to download the agent:
Invoke-WebRequest -Uri https://app.vanta.com/osquery/download/windows -OutFile vanta.msi
and then run the following command to install and register the agent to a user. Note that you will have to replace "vantaSecret" with the key available on the computers page, and "userEmail@company.com" with the user's email address that exists in Vanta:
msiexec /i vanta.msi /passive /qn VANTA_KEY=vantaSecret VANTA_OWNER_EMAIL=userEmail@company.com
Here is an example PowerShell script that could be deployed to install the Vanta Agent:
$vantaSecret= "vanta_key"
$userEmail= "email@domain.com"
try {
Invoke-WebRequest -Uri https://app.vanta.com/osquery/download/windows -OutFile vanta.msi
}
catch {
"Unable to Download the Vanta Agent. Please ensure that script is being run as an administrator"
}
try {
msiexec /i vanta.msi /passive /qn VANTA_KEY=$vantaSecret VANTA_OWNER_EMAIL=$userEmail
}
catch {
"Unable to install the Vanta Agent. Please ensure that the Vanta Secret is correct"
}
Finally {
"Successfully installed the Vanta Agent"
}