32 lines
1.2 KiB
PowerShell
32 lines
1.2 KiB
PowerShell
|
function Assert-PlatformDeveloperKitComponentsInstalled {
|
||
|
<#
|
||
|
.SYNOPSIS
|
||
|
Ensure the platform developer kit components are registered as installed so things can progress smoothly.
|
||
|
#>
|
||
|
[CmdletBinding()]
|
||
|
param()
|
||
|
|
||
|
$logLead = Get-LogLeadName
|
||
|
|
||
|
$installPath = "C:\programdata\chocolatey\lib\Alkami.Platform.DeveloperKit\tools\"
|
||
|
if (!(Test-Path -Path $installPath)) {
|
||
|
throw "$logLead : Alkami.Platform.DeveloperKit not installed. Please ensure it is installed."
|
||
|
}
|
||
|
|
||
|
$projectLogFolder = "C:\ProgramData\Alkami\Alkami.Platform.DeveloperKit"
|
||
|
if (!(Test-Path $projectLogFolder)) {
|
||
|
New-Item -ItemType Directory -Path $projectLogFolder -Force -ErrorAction Ignore | Out-Null
|
||
|
}
|
||
|
|
||
|
$wpi_msi = (Join-Path $installPath "IIS\WebPlatformInstaller_amd64_en-US.msi")
|
||
|
$logPath = (Join-Path $projectLogFolder "WebPiCmd.log")
|
||
|
|
||
|
Start-Process $wpi_msi '/qn' -PassThru | Wait-Process
|
||
|
|
||
|
& (Join-Path $installPath "IIS\ExternalDiskCache_amd64.msi") /qn /NoRestart /Log $logPath
|
||
|
& (Join-Path $installPath "IIS\rewrite_amd64_en-US.msi") /qn /NoRestart /Log $logPath
|
||
|
& (Join-Path $installPath "IIS\requestRouter_amd64.msi") /qn /NoRestart /Log $logPath
|
||
|
|
||
|
Set-DefaultTLSVersion | Out-Null
|
||
|
Update-SystemPortReservations | Out-Null
|
||
|
}
|