Powershell DSC to install Sharepoint 2013 Prerequisites in Windows 2012 R2 Server
If you would like to install with zero touch on a target machine with 2012 R2 OS the prerequisites for Sharepoint server you can do it.
First of all you need to setup the target machine:
1. Set the execution-policy to permit unsigned script to run
2. Configure the group policy to permit .exe files to run without intervention
User Configuration/Administrative Templates/Attachment Manager/Inclusion List for Low file types
( Edit/Enabled/Specify low risk: .exe / Apply )
3. Uninstall if necessary KB3102467 ( which installed .NET Framework 4.6 - incompatible with Sharepoint 2013 )
On the main server, the push server
**1. Create a folder in which you'll download the .zip file **
This file contains following files:
i. - SP2013PreReqFiles.ps1 - This file will download from the internet needed prerequisites files, except for two of them.
ii. - KB2671763.exe
iii. - and WcfDataServices56.exe
iv. - DSC_SP2013Prerequisitesmain.ps1 - The main script.
v. - DSC_SP2013W2008R2Prerequisites.ps1 - This file will create .mof files needed for DSC to configure LCM on target machines and to install features and packages as well. (But the more this script develops for other target server OSes, it will contain more specific OS files.)
2. Unzip the zip file on the main/push server
** 3. Run** DSC_SP2013Prerequisitesmain.ps1 file.
This script will:
- Create and configure locally a folder where all needed resources for the process will be stored. (You need to provide a name for prerequisite packages but you can keep the default value c:\sp2013_prerequisites if you push Enter.)
- You need to provide the target name server.
- Download from the internet the needed files to that folder and will copy files ( ii and iii ).
- It will check the operating system on the target machine and it will select the specific file which will create mof files. (In our scenario, the target machine has the 2012R2 OS, and so the needed file is: DSC_SP2013W2008R2Prerequisites.ps1)
- Finally, it will start the DSC process and push the configuration to the target LCM.
The target machine will reboot three times. Afterwards, it is ready to support the SP2013 software setup process.