ps/Modules/Alkami.DevOps.Certificates/Public/Read-AppTierCertificates.ps1

26 lines
720 B
PowerShell
Raw Normal View History

2023-05-30 22:51:22 -07:00
function Read-AppTierCertificates {
<#
.SYNOPSIS
Reads App Tier Certificates.
#>
[CmdletBinding()]
Param(
[string]$baseFolder,
[Hashtable[]]$certificatesTable
)
$logLead = (Get-LogLeadName);
[string[]]$usersWhoNeedRights = $null
$usersWhoNeedRights += "IIS_IUSRS"
foreach ($service in (Get-AppTierServices) | Where-Object {$_.User -notmatch "SYSTEM|REPLACEME"}) {
$usersWhoNeedRights += $service.User
}
Write-Verbose ("$logLead : Users who need rights read as {0}" -f ($usersWhoNeedRights -join ","))
Read-Certificates $baseFolder $certificatesTable $usersWhoNeedRights
}
Set-Alias -name Load-AppTierCertificates -value Read-AppTierCertificates;