SQL 2016 Feature Packing

or how to deal with the annoying – using PowerShell

In case you find yourself at the Download Site for SQL 2016 Feature Pack looking for CLR Types, PowerShell Tools, ReportViewer etc. – don’t despair help is here.

You may enjoy the colorful advertising and ongoing hunt (it wasn’t really any better in older Feature Packs) for bits and pieces you need – as I do require them frequently for installations – I gave myself a pass and put a very basic PowerShell script together.

Outlined below the download and install sequence (yes there is a method to this …) for as far as I am concerned almost must have pieces of the SQL 2016 Feature Pack environment namely

  • SQL 2016 CLR types (can already be installed)
  • SQL 2016 Shared Management Objects
  • SQL 2016 PowerShell Module Tools
  • SQL 2016 ReportViewer

#Various applications require add on features provided by SQL 2016 Feature Pack components
#Here a quick was to download and install them
#Sassan Karai Oct 23 2016

#SQL 2016 Feature Pack Components (Version 13.0.1601.5) can be found here
#https://www.microsoft.com/en-us/download/details.aspx?id=52676

#Start with – SQL 2016 CLR Types – needed by Management Objects – Note: SQL2016\SQL2014 CLR Types may already be installed
#https://download.microsoft.com/download/8/7/2/872BCECA-C849-4B40-8EBE-21D48CDF1456/ENU/x64/SQLSysClrTypes.msi

#Next – SQL 2016 Shared Management Object
#https://download.microsoft.com/download/8/7/2/872BCECA-C849-4B40-8EBE-21D48CDF1456/ENU/x64/SharedManagementObjects.msi

#Next – SQL 2016 PowerShell module which requires Shared Management Objects to be installed
#https://download.microsoft.com/download/8/7/2/872BCECA-C849-4B40-8EBE-21D48CDF1456/ENU/x64/PowerShellTools.msi

#Finally SQL 2016 ReportViewer – only available in x86 version
#https://download.microsoft.com/download/8/7/2/872BCECA-C849-4B40-8EBE-21D48CDF1456/ENU/x86/ReportViewer.msi

#Create the Download Directory
$DwnldDir = “C:\SQL 2016 Feature Pack”
if (!(Test-Path -path $DwnldDir))
 {
 New-Item $DwnldDir -type directory
 }
Write-Host `n”Successfully created the downlad folder for SQL 2016 Feature Pack  > C:\SQL 2016 Feature Pack” -ForegroundColor Cyan

#Download the various SQL Feature Pack component installers
#1
Write-Host `n”Downloading SQLSysClrTypes” -ForegroundColor Yellow
$object= New-Object Net.WebClient
$Clrurl=’https://download.microsoft.com/download/8/7/2/872BCECA-C849-4B40-8EBE-21D48CDF1456/ENU/x64/SQLSysClrTypes.msi’
$object.DownloadFile($Clrurl, “$DwnldDir\SQLSysClrTypes.msi”)
Write-Host `n”Successfully downloaded SQLSysClrTypes” -ForegroundColor Green
#2
Write-Host `n”Downloading Shared Management Objects” -ForegroundColor Yellow
$object= New-Object Net.WebClient
$SMOurl=’https://download.microsoft.com/download/8/7/2/872BCECA-C849-4B40-8EBE-21D48CDF1456/ENU/x64/SharedManagementObjects.msi’
$object.DownloadFile($SMOurl, “$DwnldDir\SharedManagementObjects.msi”)
Write-Host `n”Successfully downloaded Shared Management Objects” -ForegroundColor Green
#3
Write-Host `n”Downloading PowerShell Tools” -ForegroundColor Yellow
$object= New-Object Net.WebClient
$PSTurl=’https://download.microsoft.com/download/8/7/2/872BCECA-C849-4B40-8EBE-21D48CDF1456/ENU/x64/PowerShellTools.msi’
$object.DownloadFile($PSTurl, “$DwnldDir\PowerShellTools.msi”)
Write-Host `n”Successfully downloaded PowerShell Tools” -ForegroundColor Green
#4
Write-Host `n”Downloading ReportViewer” -ForegroundColor Yellow
$object= New-Object Net.WebClient
$RPTurl=’https://download.microsoft.com/download/8/7/2/872BCECA-C849-4B40-8EBE-21D48CDF1456/ENU/x86/ReportViewer.msi’
$object.DownloadFile($RPTurl, “$DwnldDir\ReportViewer.msi”)
Write-Host `n”Successfully downloaded ReportViewer” -ForegroundColor Green
#
# Installation of the 4 modules in sequence
# More abut msiexec switches here https://technet.microsoft.com/en-us/library/bb490936.aspx
Write-Host `n”*** Installing the downloaded components ***” -ForegroundColor Cyan
msiexec /qn /i “$DwnldDir\SQLSysClrTypes.msi”          | Out-Null
msiexec /qn /i “$DwnldDir\SharedManagementObjects.msi” | Out-Null
msiexec /qn /i “$DwnldDir\PowerShellTools.msi”         | Out-Null
msiexec /qn /i “$DwnldDir\ReportViewer.msi”            | Out-Null
Write-Host `n”*** Successfully installed all downloaded components ***” -ForegroundColor Cyan
#
#Check for availability of SQL PowerShell module
Write-Host `n”Checking Availability of SQL PowerShell module” -ForegroundColor Yellow
Get-Module -ListAvailable -Name Sqlps;
#

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s