PowerShell Brickset Module version 2.0.1+: Downloading Lego Instructions
The most common question I get asked about the PowerShell Brickset Module is how to use it to download the online PDF instructions Lego produce to accompany each set. The
Get-BricksetSetInstructions function is what you need for this task.
A variation on this question is around Lego sets which contain multiple instruction booklets, since
Get-BricksetSetInstructions will return a link to each of the PDFs for that set.
There are some examples in a previous article which may cover what you are looking for. However, in this article I’m providing a better example for the more complex scenario where there is a need for:
- Support for Lego sets with multiple PDFs
- Naming the downloaded files to match the Lego set number since the file name on the Lego site gives no indication which set it is for
This example will return all Lego sets with the Theme ‘Indiana Jones’ and download instruction PDFs for each one, including those with multiple booklets. You can though use the output from any query with
Get-BricksetSet, depending on which sets you need the instructions for.
Note: it’s using Start-BitsTransfer which is Windows only. Replace with the file download command of choice if you’re on a different OS.