Deprecated/Get-FreedomScientificFusion.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
$MajorVersion = 13

do {
    try {

        $Releases = Invoke-RestMethod -Uri "https://support.freedomscientific.com/Downloads/OfflineInstallers/GetInstallers?product=Fusion&version=$MajorVersion&language=mul&releaseType=Offline" -DisableKeepAlive

        foreach ($Release in $Releases) {

            $Version = $Release.FileName | Get-Version
            $Type = (Get-Culture).TextInfo.ToTitleCase([System.IO.Path]::GetExtension($Release.InstallerLocationHTTP).Replace('.',''))
            New-NevergreenApp -Name 'Fusion' -Version $Version -Uri $Release.InstallerLocationHTTP -Architecture 'Multi' -Type $Type

        }

    }
    catch {
        Write-Error "$($MyInvocation.MyCommand): $($_.Exception.Message)"
    }

    $MajorVersion++

}
until ($MajorVersion -ge ([int](Get-Date -Format 'yy') - 6) -and $Releases.Count -eq 0)