Download Brian Keller's VM with PowerShell

So yesterday and update for Brian Keller's VM (Visual Studio 2013 Application Lifecycle Management Virtual Machine and Hands-on-Labs / Demo Scripts) was release
📅 10 Jan 2014

So yesterday and update for Brian Keller's VM (Visual Studio 2013 Application Lifecycle Management Virtual Machine and Hands-on-Labs / Demo Scripts) was release

"Updated January 9, 2014: The VM was upgraded to include all applicable Visual Studio 2010 and 2012 hands-on-labs / demo scripts. This brings the total number of hands-on-labs / demo scripts you can run with this virtual machine to 24"

Now one of the easiest ways to pull down all the files is to use Free Download Manager which is explained on the post. Every time a new version of TFS is released and the VM is updated I download Free Download Manager, install it, download the files and then uninstall it. This time I thought I'd just make a PowerShell script that could do it for me as it would be less effort. Below is the PowerShell script I used it currently has all the URL's for yesterdays update but all you need to do to use this for future updates is copy everything between the 2 tokens below

###Start - Do Not Include This Line###

COPY EVERYTHING HERE

###End - Do Not Include This Row In Your Selection###

and then paste them in the string value for $Links and set the $SaveLocationFolder to a location you want to save the files to and then you can download the latest and greatest Smile

cls
$SaveLocationFolder = "Z:\Hyper-V\VS2013 2014-01-10\"
$Links = @"
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/Working with the Visual Studio 2013 ALM Virtual Machine.docx
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/Agile Planning and Portfolio Management with Team Foundation Server 2013.docx
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/Authoring and Running Manual Tests using Microsoft Test Manager 2013.docx
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/Branching and Merging Visualization with Visual Studio Team Foundation Server 2013.docx
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/Building the Right Software - Generating Storyboards and Collecting Stakeholder Feedback with Visual Studio 2013.docx
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/Code Discovery using the Architecture Tools in Visual Studio Ultimate 2013.docx
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/Debugging with IntelliTrace using Visual Studio Ultimate 2013.docx
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/Diagnosing Issues in Production with IntelliTrace and Visual Studio 2013.docx
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/Embracing Continuous Delivery with Release Management for Visual Studio 2013.docx
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/Exploratory Testing using Microsoft Test Manager 2013.docx
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/Getting Started with Git using Team Foundation Server 2013.docx
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/Introduction to Coded UI Tests with Visual Studio Ultimate 2013.docx
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/Introduction to Platform Testing with Microsoft Test Manager 2013.docx
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/Introduction to PreEmptive Analytics.docx
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/Introduction to Test Case Management with Microsoft Test Manager 2013.docx
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/Introduction to Test Planning with Microsoft Test Manager 2013.docx
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/Introduction to Web Performance and Load Testing with Visual Studio Ultimate 2013.docx
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/Lab Management using Standard Lab Environments in Visual Studio 2013.docx
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/Making Developers More Productive with Visual Studio Team Foundation Server 2013.docx
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/New Collaboration Experiences for Development Teams using Team Foundation Server 2013.docx
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/Testing and Debugging SharePoint Applications with Visual Studio 2013.docx
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/Understanding Class Coupling with Visual Studio Ultimate 2013.docx
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/Unit Testing, Code Coverage and Code Clone Analysis with Visual Studio 2013.docx
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/Using Code Analysis with Visual Studio 2013 to Improve Code Quality.docx
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/Using the Architecture Explorer in Visual Studio Ultimate 2013 to Analyze Your Code.docx
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/VisualStudio2013.RTM.ALM.part01.exe
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/VisualStudio2013.RTM.ALM.part02.rar
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/VisualStudio2013.RTM.ALM.part03.rar
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/VisualStudio2013.RTM.ALM.part04.rar
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/VisualStudio2013.RTM.ALM.part05.rar
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/VisualStudio2013.RTM.ALM.part06.rar
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/VisualStudio2013.RTM.ALM.part07.rar
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/VisualStudio2013.RTM.ALM.part08.rar
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/VisualStudio2013.RTM.ALM.part09.rar
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/VisualStudio2013.RTM.ALM.part10.rar
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/VisualStudio2013.RTM.ALM.part11.rar
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/VisualStudio2013.RTM.ALM.part12.rar
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/VisualStudio2013.RTM.ALM.part13.rar
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/VisualStudio2013.RTM.ALM.part14.rar
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/VisualStudio2013.RTM.ALM.part15.rar
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/VisualStudio2013.RTM.ALM.part16.rar
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/VisualStudio2013.RTM.ALM.part17.rar
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/VisualStudio2013.RTM.ALM.part18.rar
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/VisualStudio2013.RTM.ALM.part19.rar
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/VisualStudio2013.RTM.ALM.part20.rar
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/VisualStudio2013.RTM.ALM.part21.rar
http://download.microsoft.com/download/B/C/8/BC8558E1-192E-4286-B3B0-320A8B7CE49D/VisualStudio2013.RTM.ALM.part22.rar
"
@

foreach ($line in $Links.Split("`n"))
{
if ($line.Trim().Length -gt 0)
{
$url = "$($line.Trim())"
$urlSegments = $url.Split("/")
$saveTo = "$($SaveLocationFolder + $urlSegments[$urlSegments.Length - 1])"
if (!(Test-Path $saveTo))
{
Write-Host "Downloading '$line'"
Start-BitsTransfer $url $saveTo
}
}
}

Enjoy