So I manage to create below script, which will download the .exe file from McAfee website and execute it. However, the name of .exe file in website keeps on changing daily basis. For e.g. file is V3_4756dat.exe, next day version will be changed to V3_4757dat.exe and keeps on incrementing by +1. Any idea what changes I can make in below code to achieve this.
# URL and Destination
$url = "https://download.nai.com/products/datfiles/V3DAT/V3_4756dat.exe"
$dest = "C:\Users\user\Desktop\V3_4756dat.exe"
# Download file
Start-BitsTransfer -Source $url -Destination $dest
#file execution
Start-Process -FilePath “V3_4756dat.exe” -WorkingDirectory “C:\Users\user\Desktop\”