26 lines
720 B
PowerShell
26 lines
720 B
PowerShell
|
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;
|