The Below Powershell script will download your McAfee Antivirus Agent from your local server and execute a silent install for the agent.

#!powershell

# Setup Key Values
###################################
$URL=”http://yourmcafeeserver//PROD_WIN_ePO_Agent_FramePkg.exe”
$downloadtargetpath= “C:\temp\PROD_WIN_ePO_Agent_FramePkg.exe”

# Forece TLS 1.2
###################################
[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

write-host ” ”
write-host “Download McAfee Binaries from: $URL” -ForegroundColor Yellow
write-host ” “

try
 {
   Invoke-WebRequest -UseBasicParsing $URL -OutFile $downloadtargetpath -ErrorAction Stop
 }
 catch
 {
   $err=$_.Exception
   write-host “Errors Output”
   echo $_.Exception|format-list -force
   write-host “User Name : $env:UserName”
   write-host “User Domain : $env:UserDomain”
   write-host “Computer Name : $env:ComputerName”
 }

write-host ” ”
write-host “Installing McAfee ePO Agent” -ForegroundColor Yellow
write-host ” “
$McAfeePath = ‘c:\temp\PROD_WIN_ePO_Agent_FramePkg.exe ‘
& $McAfeePath ‘/Install=Agent’ ‘/Silent’ | out-null