ADLAB PowerShell source file: buildup-httpsys.ps1

(C) Ondrej Sevecek, 2019 - www.sevecek.com, ondrej@sevecek.com



$libDir = Split-Path -parent $MyInvocation.MyCommand.Definition
& "$libDir\lib-common.ps1" -defaultConfig -rootDir $libDir -outFile httpsLib
& "$libDir\lib-modifyActions.ps1"
& "$libDir\lib-buildup.ps1"

$vmName = $args[0]

DBG ('HTTP.SYS installation library')
Redirect-TempToOutput
Load-VMConfig

Find-MarkedVolumes


$appTag = 'httpsBinding'
$appConfig = $vmConfig.$appTag



if (Is-Null $appConfig) { DBG ('Invalid appCofnig, exiting'); exit }
#====================
#====================


Bind-HttpsCertificates






# SIG # Begin signature block
# MIIc2AYJKoZIhvcNAQcCoIIcyTCCHMUCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
# gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR
# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUhjHZKGYnJOrX3Ei3DJRYGMkk
# ZjGgghgEMIIE5TCCA82gAwIBAgIQOb1CntKBbrrVvMkDtLpl5zANBgkqhkiG9w0B
# AQsFADB1MQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTHRkLjEpMCcG
# A1UECxMgU3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxIzAhBgNVBAMT
# GlN0YXJ0Q29tIENsYXNzIDIgT2JqZWN0IENBMB4XDTE2MTIwMTE1NTExM1oXDTE4
# MTIwMTE1NTExM1owUTELMAkGA1UEBhMCQ1oxGjAYBgNVBAgMEUppaG9tb3JhdnNr
# eSBLcmFqMQ0wCwYDVQQHDARCcm5vMRcwFQYDVQQDDA5PbmRyZWogU2V2ZWNlazCC
# ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK/RPYTY9Om2rIfSV/e5KbKi
# vWf3IjgQurayOJ75VvQj8ISgU2+cAK4cS2GQRvY1j1q3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