Skip to content

Instantly share code, notes, and snippets.

@jonathanmedd
Last active January 15, 2021 15:10
Show Gist options
  • Save jonathanmedd/2115a3be60cfe5ce2cd4a1d812cb9e39 to your computer and use it in GitHub Desktop.
Save jonathanmedd/2115a3be60cfe5ce2cd4a1d812cb9e39 to your computer and use it in GitHub Desktop.
Download Lego Instructions for a Theme
Get-BricksetSet -Theme 'Indiana Jones' | ForEach-Object {
$i = 1
$instructionsUrls = $_ | Get-BricksetSetInstructions | Select-Object -ExpandProperty url
foreach ($instructionsUrl in $instructionsUrls){
$file = "$($_.number)_$($i).pdf"
$i++
Start-BitsTransfer -Source $instructionsUrl -Destination "C:\temp\$file"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment