Most likely you’ve read Shawn Dieken’s wildly popular article on how to create a redist folder when installing CRM without an internet connection.  Today I was presented with a customer scenario where a server that should have had internet access did not and thus, we had to install without internet access.  No big deal, however after walking through the article I quickly realized this task, while effective, was pretty monotonous and not a lot of fun.  I caught myself thinking “there must be a better way” – and turns out there was and all we needed to do was bring PowerShell into the mix!

With a few lines of code and a little testing, I had a script to paste in to PowerShell and create my very own CRM 2011 Redist folder with all the pre-requisite files.

Usually you find PowerShell scripts downloadable as PS1 files, but sometimes in scenarios like this I find myself just wanting to, copy my script, open PowerShell, Paste, and Go.  With that in mind, this script can be simply copied and pasted into PowerShell so you can quickly build your redist folder.

Instructions for use:

  1. Open PowerShell on the computer you have internet access on
  2. Copy the script below top to bottom (from the “#begin script” to the “#end script”)
  3. Paste it right into PowerShell – if it doesn’t execute hit enter to run the “Create-CRM2011Redist” function
  4. This will pop up a folder picker, pick a folder and press OK
  5. After you press Ok, the script will create a new Redist folder in the destination you’ve selected it will then proceed to create the directory structure (11 Folders), then download 24 files, this should total about 216MB of disk space when it’s all done.
  6. Finally, once it has completed, copy the redist folder to the install folder containing: Server, Client, EmailRouter, and BIDSExtensions folders
  7. When you’re done copying your install folder should look like the graphic below:

Download the PowerShell Script as a .txt file.

#begin Script 
#Function to Show an Open Folder Dialog and return the directory selected by the user.
function Read-FolderBrowserDialog([string]$Message, [string]$InitialDirectory)
$app = New-Object -ComObject Shell.Application
$folder = $app.BrowseForFolder(0, $Message, 0, $InitialDirectory)
if ($folder) { return $folder.Self.Path } else { return '' }
#download pre-req function, also creates the folders
function dlPreReq($root, $folderName, $fileName, $url)
$fldr = Join-Path -Path $root -Child $folderName
$dest = Join-Path -Path $fldr -Child $fileName

#create folder if it doesnt exist
if((Test-Path -Path $fldr) -ne $True)
New-Item -Path $fldr -ItemType directory | out-null
Write-Host ("Downloading {0} to path: {1} " -f $fileName, $fldr)
$wc = New-Object
#download each pre-req
function Create-CRM2011Redist()
$folderRoot = (Read-FolderBrowserDialog "Pick the location to create the Dynamics CRM 2011 redist folder")
if(($folderRoot.length) -gt 0)
$folderRoot = Join-Path -Path $folderRoot -Child "Redist"
dlPreReq $folderRoot dotNETFX "dotNetFx40_Full_x86_x64.exe" ""
dlPreReq $folderRoot DotNetServicesSDK WindowsAzureAppFabricSDK-x64.msi ""
dlPreReq $folderRoot IDCRL wllogin_32.msi ""
dlPreReq $folderRoot IDCRL wllogin_64.msi ""
dlPreReq $folderRoot MSI45 WindowsServer2003-KB942288-v4-x86.exe ""
dlPreReq $folderRoot MSI45 WindowsServer2003-KB942288-v4-x64.exe ""
dlPreReq $folderRoot MSI45 Windows6.0-KB942288-v2-x86.msu ""
dlPreReq $folderRoot MSI45 Windows6.0-KB942288-v2-x64.msu ""
dlPreReq $folderRoot MSI45 WindowsXP-KB942288-v3-x86.exe ""
dlPreReq $folderRoot MsoIdCrl msoidcli_32.msi ""
dlPreReq $folderRoot MsoIdCrl msoidcli_64.msi ""
dlPreReq $folderRoot ReportViewer ReportViewer.exe ""
dlPreReq $folderRoot SQLCE SSCERuntime-ENU-x86.msi ""
dlPreReq $folderRoot SQLCE SSCERuntime-ENU-x64.msi ""
dlPreReq $folderRoot SQLExpr SQLEXPR_x86_ENU.exe ""
dlPreReq $folderRoot SQLNativeClient sqlncli_x64.msi ""
dlPreReq $folderRoot VCRedist vcredist_x86.exe ""
dlPreReq $folderRoot VCRedist vcredist_x64.exe ""
dlPreReq $folderRoot WindowsIdentityFoundation Windows5.2-KB974405-x86.exe ""
dlPreReq $folderRoot WindowsIdentityFoundation Windows5.2-KB974405-x64.exe ""
dlPreReq $folderRoot WindowsIdentityFoundation Windows6.0-KB974405-x86.msu ""
dlPreReq $folderRoot WindowsIdentityFoundation Windows6.0-KB974405-x64.msu ""
dlPreReq $folderRoot WindowsIdentityFoundation Windows6.1-KB974405-x86.msu ""
dlPreReq $folderRoot WindowsIdentityFoundation Windows6.1-KB974405-x64.msu ""
write-host "No folder selected, operation was aborted. Run Create-CRM2011Redist to retry."

#kick off the script

#end script