Freigeben über


Windows PowerShell Script: Download SharePoint 2010 Prerequisites

This is the first in a new series of posts that puts the spotlight on Windows PowerShell scripts for SharePoint 2010 Products that are stored in the TechNet Gallery. In each post, we will describe a script’s functionality and use and look under the hood at specific Windows PowerShell programming techniques that you can learn for your own scripts.

Download SharePoint 2010 Prerequisites
The Download SharePoint 2010 Prerequisites Windows PowerShell script (https://gallery.technet.microsoft.com/bcf3332d-f726-4ac7-b01a-eeda4b7ece8e) downloads and stores all of the files for the prerequisites of SharePoint Server 2010 in a specified location. This is useful when installing SharePoint Server 2010 in an offline environment or as part of an automated setup and is a Windows PowerShell alternative to using the PrerequisiteInstaller.exe tool, as described in Install prerequisites from a network share.

You can test this script by copying the code into a text editor (click Copy Code on the script page, then paste it), saving it as a .PS1 file, then executing the script by specifying its path and .ps1 file name for the Windows PowerShell prompt (example: PS C:usersdefault> c:usersjoedaviessp2010prereq.ps1).

For those of you honing your Windows PowerShell programming skills, notice how this script loads the $UrlList object with the set of download URLs and then uses a Foreach{} structure to download each file into the specified folder with the Start-BitsTransfer Background Intelligent Transfer Service (BITS) cmdlet.

See the TechNet Gallery for a list of Windows PowerShell scripts for SharePoint 2010 Products.

For more information about Windows PowerShell support in SharePoint Server 2010, see the following:

To get started with SharePoint Server 2010, see the following:

 

Enjoy!

 
Joe Davies
Principal Writer
SharePoint Platform and Infrastructure Writing Team