Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Scans a computer using ESET - https://help.eset.com/eis/11/en-US/advanced_cmd.html
- # Requires: ESET Security (latest stable version)
- # Version: 1.0A
- # Edit this to where you have ESET Security installed
- $esetEXE = 'C:\Program Files\ESET\ESET Security\ecls.exe'
- # End edits
- $process = $esetEXE
- $StartTime = $(get-date)
- Write-Host 'Start Time:'$StartTime -ForegroundColor Magenta
- # Run scan
- $arguments = '/files /memory /boots /sfx /suspicious /unwanted /unsafe'
- $process = Start-Process $esetEXE -ArgumentList $arguments -PassThru
- $process.WaitForExit()
- $result = $process.ExitCode
- if($result -eq 0)
- {
- Write-Host 'No malware found :D' -ForegroundColor Green
- }
- elseif(($result -eq 1) -or ($result -gt 50))
- {
- Write-Host 'Malware found, check again with GUI version of ESET or other malware scanner :S' -ForegroundColor Red
- }
- else
- {
- Write-Host 'Threat found and cleaned :D' -ForegroundColor Yellow
- }
- $elapsedTime = $(get-date) - $StartTime
- $totalTime = "{0:HH:mm:ss}" -f ([datetime]$elapsedTime.Ticks)
- Write-Host 'Time taken:'$totalTime -ForegroundColor Magenta
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement