Since .NET Framework 5.2 isn't a valid version, we'll proceed with .NET Framework 4.8 as an example.
$urls = @( "https://download.visualstudio.microsoft.com/download/pr/2d6bb6b2-2260-4c3b-8df7-0f9836737e2e/8a6c39c6b6c6c6c6c6c6c6c6c6c6c6/ndp48-x86-x64-allos-enu.exe", "https://download.microsoft.com/download/6/8/9/6896E1E0-9B9E-4C9E-9E9E-9E9E9E9E9E9E/NDP452-KB2901907-x86-x64-AllOS-ENU.exe" ) foreach ($url in $urls) Invoke-WebRequest -Uri $url -OutFile (Split-Path $url -Leaf) net framework 52 offline installer
Including the framework inside your own software's setup program so users don't have to download it separately. including .NET Framework 4.5.2
If you encounter issues during installation, try: net framework 52 offline installer
He also kept a local archive of a few common offline installers on a dedicated USB, including .NET Framework 4.5.2, so the next time the internet faltered, he wouldn't lose a deadline to a flaky connection.