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 🙂

# Download all SC 2012 R2 Preview VHD Eval
#
# Niklas Akerlund / Lumagate 2013-07-10

# Downloadfolder
$Dest = "D:\VHDEVALR2"
$SizeOfSCR2 = 70GB

# Get Space on volume
$SpaceRemaining = (Get-Volume $Dest.Split(":")[0]).SizeRemaining

if($SpaceRemaining -gt $SizeOfSCR2){
# SCVMM
((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}
# SCOM
((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}
# SCORCH
((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}
# SCAC
((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}
# SCDPM
((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}
# SCCM
((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}
# SCSM
((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}
# SCSM DW
((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}
}else{
[int]$Sum = ($SizeOfSCR2 - $SpaceRemaining)/1GB
Write-Host "Free up at least $Sum GB and try again!"
}

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