Some time ago, I wrote a post How to download Sitecore files with a PowerShell. Previously I showed how to download all files; in this post, I added a simple interface to choose files to download from Sitecore downloads page. Provided solution also allows the user to filter files.

The procedure is divided into three phases:
- Connect to Sitecore download page
- Parse Sitecore download page
- Display all files available for download
- Download selected files
$session = Connect-ToSitecore -UserName $credentials.userName -Password $credentials.password
$filesToDownload = Read-SitecorePage -UrlToParse $download -Session $session
$selectedFiles = $filesToDownload | Out-GridView -Title "Choose Sitecore packages to download" -OutputMode Multiple
$selectedFiles | Get-SitecoreFiles -Destination $destination -Session $session
Script configuration is simple, we need to configure:
- URL – a link to the page that will be parsed and all files available to download will be displayed.
- Destination – a path to folder where files will be saved. If destination folder not exists will be created.
- Username and password required to login to Sitecore download page
$credentials = @{
userName = ''
password = ''
}
# Sitecore page to parse
$download = "https://dev.sitecore.net/Downloads/Sitecore_Experience_Platform/91/Sitecore_Experience_Platform_91_Update1.aspx"
# Folder name where Sitecore files will be downloaded
$destination = "C:\SitecoreInstall\Sitecore_Experience_Platform_91_Update1"
mkdir $destination -force | Out-Null
Script is a part of Sitecore Installation Extensions tools and is available in GitHub repository
https://github.com/SoftServeInc/SitecoreInstallExtensions/blob/master/tools/download-sitecore.ps1
Security
Put username and password in a script file is a bad idea. In the next post, I will show how to protect and store username and password required for login to Sitecore download page.
Feedback
If you see any issues or have a suggestions how to improve this example please open issue on GitHub.