Get VirusTotal Report using PowerShell

VirusTotal is a free virus, malware and URL online scanning service. File checking is done with more than 50 antivirus solutions.

Using this script you can query VirusTotal service from PowerShell using a file name or by hash, and get a detailed report about the file.

Written by Moti Bani - mobani@microsoft.com - (https://blogs.technet.com/b/motiba/) with script portions copied from https://psvirustotal.codeplex.com
Reviewed and edited by Martin Schvartzman
Sign up to VirusTotal Community to get API Key - https://www.virustotal.com/en/documentation/public-api

Examples:

Get-VirusTotalReport -VTApiKey YourAPIKey_1234567890 -FilePath C:\temp\sys\procexp.exe

Get-VirusTotalReport -VTApiKey YourAPIKey_1234567890 -Hash be677bd5fb580ed1acf47777b34b19597feeea07d1ee90646ffa310e58232cbb