Skip to content

Instantly share code, notes, and snippets.

@agarzon
Created July 12, 2023 01:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agarzon/5c30b587233110bb5c94702dffd67d73 to your computer and use it in GitHub Desktop.
Save agarzon/5c30b587233110bb5c94702dffd67d73 to your computer and use it in GitHub Desktop.
Download all the MSFS SDK msi installers automatically (flight simulator)
$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