File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,21 +9,25 @@ function Deploy-AdcsGoat {
99 )
1010
1111 # We need blank template objects.
12- $TemplateNames | ForEach-Object {
12+ $TemplateNames | ForEach-Object {
1313 New-AdcsGoatBlankTemplateObject - TemplateName $_
1414 }
1515
1616 # We need to assign properties to the blank template objects to turn them into real templates.
17- $TemplateNames | ForEach-Object {
18- $PropertiesPath = Join-Path - Path " .\Research" - ChildPath " ${_} .xml"
17+ $TemplateNames.Where ( { $_ -ne ' ESC4 ' } ) | ForEach-Object {
18+ $PropertiesPath = Join-Path - Path " .\Research" - ChildPath " ${_} .xml"
1919 $Properties = Import-Clixml - Path $PropertiesPath
2020 Set-AdcsGoatTemplateProperty - TemplateName $_ - Properties $Properties
2121 }
2222
23- # We need to grant low privileged users control over blank template objects to turn them into ESC issues.
24- $TemplateNames | ForEach-Object {
23+ # We need to grant low privileged users Enroll right on template objects to turn them into ESC issues.
24+ $TemplateNames.Where ( { $_ -ne ' ESC4 ' } ) | ForEach-Object {
2525 Set-AdcsGoatTemplateAce - TemplateName $_ - AceType Enroll
2626 }
27+
28+ # We need to grant low privileged users Full Control over a template object to turn it into an ESC4.
29+ $TemplateNames.Where ( { $_ -eq ' ESC4' } ) | ForEach-Object {
30+ Set-AdcsGoatTemplateAce - TemplateName $_ - AceType GenericAll
31+ }
2732}
2833
29-
You can’t perform that action at this time.
0 commit comments