Read the zone marker
A file downloaded from the internet carries a **Zone.Identifier** alternate data stream. Zone 3 is the internet, and that is what triggers the prompt.
Get-Item 'C:\temp\setup.exe' -Stream * | Select-Object Stream,Length
Get-Content 'C:\temp\setup.exe' -Stream Zone.Identifier -ErrorAction SilentlyContinue
Get-Item 'C:\temp\setup.exe' | Select-Object Name,Length,LastWriteTime