Created
July 12, 2023 01:21
-
-
Save agarzon/5c30b587233110bb5c94702dffd67d73 to your computer and use it in GitHub Desktop.
Download all the MSFS SDK msi installers automatically (flight simulator)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$version = Read-Host "Enter the version (default: 0.21.1):" | |
if ([string]::IsNullOrWhiteSpace($version)) { | |
$version = "0.21.1" | |
} | |
$baseUrl = "https://sdk.flightsimulator.com/files/installers/$version/" | |
$urls = @( | |
"MSFS_SDK_Documentation_Installer_$version.0.msi", | |
"MSFS_SDK_Core_Installer_$version.0.msi", | |
"MSFS_SDK_Samples_Installer_$version.0.msi" | |
) | |
$destination = [Environment]::GetFolderPath("UserProfile") + "\Downloads" | |
foreach ($url in $urls) { | |
$fileUrl = $baseUrl + $url | |
Write-Host $fileUrl | |
$fileName = Split-Path -Path $url -Leaf | |
$filePath = Join-Path -Path $destination -ChildPath $fileName | |
Write-Host "Downloading $fileName..." | |
Invoke-WebRequest -Uri $fileUrl -OutFile $filePath | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment