Download all System Center R2 eval VHD with PowerShell

I have already blogged about how to use PowerShell to download all of the System Center 2012 SP1 VHD evaluation files with PowerShell and BITS.

As Microsoft has released an updated version with Windows 2012 R2 and System Center 2012 R2 Preview I wanted to give you the script with updated url´s so you can easily download and try out the different roles! Note though that the Configuration Manager evaluation VHD has not yet been released, I still have the link in the script so when it will be available you can download it! They have also changed the packages to .bin instead of .rar.

Make sure that you have enough space on your volume and then run the following script and you will within a time that of course depends on your internet connection have all files necessary to start evaluate. I will update the script with the right size of R2 once I have downloaded all but think that 70 GB will be enough at lest now when SCCM is not available 🙂

01# Download all SC 2012 R2 Preview VHD Eval
02#
03# Niklas Akerlund / Lumagate 2013-07-10
04 
05# Downloadfolder
06$Dest = "D:\VHDEVALR2"
07$SizeOfSCR2 = 70GB
08 
09# Get Space on volume
10$SpaceRemaining = (Get-Volume $Dest.Split(":")[0]).SizeRemaining
11 
12if($SpaceRemaining -gt $SizeOfSCR2){
13# SCVMM
14((Invoke-WebRequest -Uri "http://www.microsoft.com/en-us/download/confirmation.aspx?id=34803").links | ? href -match "rar$|exe$|docx$|bin$").href | %{Start-BitsTransfer -Source $_ -Destination $Dest}
15# SCOM
16((Invoke-WebRequest -Uri "http://www.microsoft.com/en-us/download/confirmation.aspx?id=34780").links | ? href -match "rar$|exe$|docx$|bin$").href | %{Start-BitsTransfer -Source $_ -Destination $Dest}
17# SCORCH
18((Invoke-WebRequest -Uri "http://www.microsoft.com/en-us/download/confirmation.aspx?id=34778").links | ? href -match "rar$|exe$|docx$|bin$").href | %{Start-BitsTransfer -Source $_ -Destination $Dest}
19# SCAC
20((Invoke-WebRequest -Uri "http://www.microsoft.com/en-us/download/confirmation.aspx?id=39369").links | ? href -match "rar$|exe$|docx$|bin$").href | %{Start-BitsTransfer -Source $_ -Destination $Dest}
21# SCDPM
22((Invoke-WebRequest -Uri "http://www.microsoft.com/en-us/download/confirmation.aspx?id=34779").links | ? href -match "rar$|exe$|docx$|bin$").href | %{Start-BitsTransfer -Source $_ -Destination $Dest}
23# SCCM
24((Invoke-WebRequest -Uri "http://www.microsoft.com/en-us/download/confirmation.aspx?id=39368").links | ? href -match "rar$|exe$|docx$|bin$").href | %{Start-BitsTransfer -Source $_ -Destination $Dest}
25# SCSM
26((Invoke-WebRequest -Uri "http://www.microsoft.com/en-us/download/confirmation.aspx?id=34777").links | ? href -match "rar$|exe$|docx$|bin$").href | %{Start-BitsTransfer -Source $_ -Destination $Dest}
27# SCSM DW
28((Invoke-WebRequest -Uri "http://www.microsoft.com/en-us/download/confirmation.aspx?id=39367").links | ? href -match "rar$|exe$|docx$|bin$").href | %{Start-BitsTransfer -Source $_ -Destination $Dest}
29}else{
30[int]$Sum = ($SizeOfSCR2 - $SpaceRemaining)/1GB
31Write-Host "Free up at least $Sum GB and try again!"
32}

Start downloading and explore while your vacation rains away (actually the first day it rains here for some weeks)!

Leave a comment

name*

email* (not published)

website