Get all download links from Microsoft Evaluation Center

A few weeks ago, the Microsoft Evaluation Center’s website was down, and I saw a post about it on the Tech Community. (Article) People were sharing links to a few ISO files from it to help people who needed them. That got me thinking. What if I could export all of them just in case something happens to the site again?! This blog post describes a method to retrieve all links from the Evaluation Center.

What is Microsoft Evaluation Center?

“The Microsoft Evaluation Center brings you full-featured Microsoft product evaluation software available for download or trial on Microsoft Azure.” It contains downloads and trials that you can start, not for production use, but for testing purposes.

Requirements of the script

It should be able to retrieve all links from various topics (Windows 10/11, Windows Server, SQL Server, etc.) for all languages, along with a description and the corresponding download link.

Output

Below is the output of the script. It allows you to display the URL being scanned and the number of download links found.

It generates a CSV file that looks like this in Excel: (Example of a few downloads from the 244 in total, amount may differ if Microsoft releases more versions, etc. ):

The script

Below is the script. Change the $outputfile variable to save the output EvalCenterDownloads.csv to a different location.

Note: Run this script from a PowerShell 7 prompt. Running in PowerShell 5 or ISE/VSCode doesn’t work.

#Reset totalcount to null
$totalcount = $null
 
#Set output file location
$outputfile = 'D:\Temp\EvalCenterDownloads.csv'
 
#List of Evalution Center links with downloadable content
$urls = @(
    'https://www.microsoft.com/en-us/evalcenter/download-biztalk-server-2016',
    'https://www.microsoft.com/en-us/evalcenter/download-host-integration-server-2020',
    'https://www.microsoft.com/en-us/evalcenter/download-hyper-v-server-2016',
    'https://www.microsoft.com/en-us/evalcenter/download-hyper-v-server-2019',
    'https://www.microsoft.com/en-us/evalcenter/download-lab-kit',
    'https://www.microsoft.com/en-us/evalcenter/download-mem-evaluation-lab-kit',
    'https://www.microsoft.com/en-us/evalcenter/download-microsoft-endpoint-configuration-manager',
    'https://www.microsoft.com/en-us/evalcenter/download-microsoft-endpoint-configuration-manager-technical-preview',
    'https://www.microsoft.com/en-us/evalcenter/download-microsoft-identity-manager-2016',
    'https://www.microsoft.com/en-us/evalcenter/download-sharepoint-server-2013',
    'https://www.microsoft.com/en-us/evalcenter/download-sharepoint-server-2016',
    'https://www.microsoft.com/en-us/evalcenter/download-sharepoint-server-2019',
    'https://www.microsoft.com/en-us/evalcenter/download-skype-business-server-2019',
    'https://www.microsoft.com/en-us/evalcenter/download-sql-server-2016',
    'https://www.microsoft.com/en-us/evalcenter/download-sql-server-2017-rtm',
    'https://www.microsoft.com/en-us/evalcenter/download-sql-server-2019',
    'https://www.microsoft.com/en-us/evalcenter/download-system-center-2019',
    'https://www.microsoft.com/en-us/evalcenter/download-system-center-2022',
    'https://www.microsoft.com/en-us/evalcenter/download-windows-10-enterprise',
    'https://www.microsoft.com/en-us/evalcenter/download-windows-11-enterprise',
    'https://www.microsoft.com/en-us/evalcenter/download-windows-11-office-365-lab-kit',
    'https://www.microsoft.com/en-us/evalcenter/download-windows-server-2012-r2',
    'https://www.microsoft.com/en-us/evalcenter/download-windows-server-2012-r2-essentials',
    'https://www.microsoft.com/en-us/evalcenter/download-windows-server-2012-r2-essentials',
    'https://www.microsoft.com/en-us/evalcenter/download-windows-server-2016',
    'https://www.microsoft.com/en-us/evalcenter/download-windows-server-2016-essentials',
    'https://www.microsoft.com/en-us/evalcenter/download-windows-server-2019',
    'https://www.microsoft.com/en-us/evalcenter/download-windows-server-2019-essentials',
    'https://www.microsoft.com/en-us/evalcenter/download-windows-server-2022'
    'https://www.microsoft.com/en-us/evalcenter/download-windows-server-2025'
)
 
#Loop through the urls, search for download links and add to totalfound array and display number of downloads
$ProgressPreference = "SilentlyContinue"
$totalfound = foreach ($url in $urls) {
    try {
        $content = Invoke-WebRequest -Uri $url -UseBasicParsing -ErrorAction Stop 
        $downloadlinks = $content.links | Where-Object { `
                $_.'aria-label' -match 'Download' `
                -and $_.outerHTML -match 'fwlink' `
                -or $_.'aria-label' -match '64-bit edition' }    
        $count = $DownloadLinks.href.Count
        $totalcount += $count
        Write-host ("Processing {0}, Found {1} Download(s)..." -f $url, $count) -ForegroundColor Green
        foreach ($DownloadLink in $DownloadLinks) {
            [PSCustomObject]@{
                Title  = $url.split('/')[5].replace('-', ' ').replace('download ', '')
                Name   = $DownloadLink.'aria-label'.Replace('Download ', '')
                Tag    = $DownloadLink.'data-bi-tags'.Split('&')[3].split(';')[1]
                Format = $DownloadLink.'data-bi-tags'.Split('-')[1].ToUpper()
                Link   = $DownloadLink.href
            }
        }
    }
    catch {
        Write-Warning ("{0} is not accessible" -f $url)
    }
}


#Output total downloads found and exports result to the $outputfile path specified
Write-Host ("Found a total of {0} Downloads" -f $totalcount) -ForegroundColor Green
$totalfound | Sort-Object Title, Name, Tag, Format | Export-Csv -NoTypeInformation -Encoding UTF8 -Delimiter ';' -Path $outputfile

Download the script(s) from GitHub here

2 thoughts on “Get all download links from Microsoft Evaluation Center

  1. Thank you for sharing
    I got below error
    Processing https://www.microsoft.com/en-us/evalcenter/download-microsoft-endpoint-configuration-manager, Found 1 Download(s)…
    WARNING: https://www.microsoft.com/en-us/evalcenter/download-microsoft-endpoint-configuration-manager is not accessible
    WARNING: https://www.microsoft.com/en-us/evalcenter/download-sql-server-2019 is not accessible
    Found a total of 1 Downloads
    Export-Csv : Could not find a part of the path ‘D:\Temp\EvalCenterDownloads.csv’.
    At line:46 char:54
    + … g, Format | Export-Csv -NoTypeInformation -Encoding UTF8 -Delimiter ‘ …
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : OpenError: (:) [Export-Csv], DirectoryNotFoundException
    + FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.ExportCsvCommand

Leave a Reply to Harm VeenstraCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.