SCCM 1511 - All prerequisites, in PowerShell

Published January 22, 2016 by FoxDeploy

Depicts an image saying 'Scripting System Center Configuration Manager'

This post is part of the ‘Scripting SCCM’ series on FoxDeploy, click the banner for more!

Just a warning, there’s a FEW things you can’t install w/ PowerShell, so make sure that you still do these steps manually:

  • Use ADSI Edit to create a Systems\Systems Management Container
  • Give your SCCM Primary site computer account ‘Full Control’ permissions of this and all descendant objects

Beyond that, this PowerShell script will install all of the Non-SQL Pre-requisites for you.

To use, first, download the Windows 10 ADK from this  link.  Place it in a folder called _Software\ADK at the root of a drive.

Next, download the x86 and x64 bit MS XML Parsers, available, uh in the links to the left. Put these both within the same _Software folder.

Finally, insert a Windows Server install disk (for your appropriate OS Version) to the machine.

Then, run this code to install all Prerequisites in record time!

 $drives = Get-PSDrive -PSProvider FileSystem $PrereqDrive = $drives.Root | ? ({Test-Path $\_\\\_Software}) if (test-path "$($PrereqDrive)\_Software"){ $PreReqSrc = "$($PrereqDrive)\_Software" Write-Host "SCCM Prereq source found at $PreReqSrc" } else { Write-Warning "Couldn't find a source folder called '\_Software' at the root of any drive" }

$ServerISODrive = $drives.Root | ? ({Test-Path $\_\\Sources}) $ServerSXSSrc = "$($ServerISODrive)Sources"

Write-Host "Installing MSXML Prereqs..." try { Msiexec /i $PreReqSrc\\msxml6.msi /passive /l\*+ %windir%\\temp\\SCCM\_MSXML6.log msiexec /i $PreReqSrc\\msxml6\_x64.msi /passive /l\*+ %windir%\\temp\\SCCM\_MSXML6\_64.log } catch { Write-Warning "Ensure that MSXML files were placed within $PreReqSrc" }

Add-WindowsFeature -Name NET-Framework-Features,NET-Framework-Core -Source $ServerSXSSrc\\sxs

& $PreReqSrc\\ADK\\adksetup.exe /features OptionId.ApplicationCompatibilityToolkit,OptionId.DeploymentTools,OptionId.WindowsPreinstallationEnvironment,OptionId.UserStateMigrationTool,OptionId.VolumeActivationManagementTool,OptionId.WindowsPerformanceToolkit,OptionId.SqlExpress2012 /ceip ON /norestart

Add-WindowsFeature BITS,BITS-IIS-Ext,BITS-Compact-Server, Web-Server, Web-WebServer, Web-Common-Http, Web-Default-Doc,Web-Dir-Browsing,Web-Http-Errors, Web-Static-Content, Web-Http-Redirect,Web-App-Dev,Web-Net-Ext,Web-Net-Ext45,Web-ASP,Web-Asp-Net,Web-Asp-Net45,Web-CGI,Web-ISAPI-Ext,Web-ISAPI-Filter,Web-Health,Web-Http-Logging,Web-Custom-Logging,Web-Log-Libraries,Web-Request-Monitor,Web-Http-Tracing,Web-Performance,Web-Stat-Compression,Web-Security,Web-Filtering,Web-Basic-Auth,Web-IP-Security,Web-Url-Auth,Web-Windows-Auth,Web-Mgmt-Tools,Web-Mgmt-Console,Web-Mgmt-Compat,Web-Metabase,Web-Lgcy-Mgmt-Console,Web-Lgcy-Scripting,Web-WMI,Web-Scripting-Tools,Web-Mgmt-Service, RDC -Verbose

Install-WindowsFeature -Name UpdateServices-Ui 

Microsoft MVP

Five time Microsoft MVP, and now I work for the mothership

Need Help?

Get help much faster on our new dedicated Subreddit!

depicts a crowd of people in a night club with colored lights and says 'join the foxdeploy subrreddit today'

Blog Series
series_sml_PowerShellGUI series_sml_IntroToRaspberryPi Programming series_sml_IntroToWindows Remote Management Series The Logo for System Center Configuration Manager is displayed here Depicts a road sign saying 'Learning PowerShell Autocomplete'

Blog Stats