Skip to content

Commit cccd64d

Browse files
committed
chore: update prefix from 'AdcsGoat' to 'AG'
AdcsGoat was too long.
1 parent 2ca28d2 commit cccd64d

6 files changed

Lines changed: 14 additions & 14 deletions
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
function Find-AdcsGoatEnrollmentService {
1+
function Find-AGEnrollmentService {
22
# Get the Configuration partition automatically via RootDSE
33
$RootDSE = New-Object System.DirectoryServices.DirectoryEntry("LDAP://RootDSE")
44
$ConfigurationPartition = $rootDSE.configurationNamingContext
55
$EnrollmentServicesContainer = "CN=Enrollment Services,CN=Public Key Services,CN=Services,$ConfigurationPartition"
66
$EnrollmentServicesPath = New-Object System.DirectoryServices.DirectoryEntry("LDAP://$EnrollmentServicesContainer")
77
$EnrollmentServicesPath.Children
8-
}
8+
}

ADCSGoat/Public/Get-AdcsGoatEnrollmentServiceFullName.ps1 renamed to ADCSGoat/Public/Get-AGEnrollmentServiceFullName.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
function Get-AdcsGoatEnrollmentServiceFullName {
1+
function Get-AGEnrollmentServiceFullName {
22
param (
33
[Parameter(Mandatory)]
44
[ValidateScript({ $_.objectClass -eq 'pKIEnrollmentService' })]
55
[System.DirectoryServices.DirectoryEntry]$EnrollmentService
66
)
77

88
"$($EnrollmentService.dNSHostName)\$($EnrollmentService.name)"
9-
}
9+
}

ADCSGoat/Public/New-AdcsGoatBlankTemplateObject.ps1 renamed to ADCSGoat/Public/New-AGBlankTemplateObject.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function New-AdcsGoatBlankTemplateObject {
1+
function New-AGBlankTemplateObject {
22
[CmdletBinding()]
33
param (
44
[Parameter(ValueFromPipeline, Mandatory)]

ADCSGoat/Public/Set-AdcsGoatEnrollmentServiceFullName.ps1 renamed to ADCSGoat/Public/Set-AGEnrollmentServiceFullName.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
function Set-AdcsGoatEnrollmentServiceFullName {
1+
function Set-AGEnrollmentServiceFullName {
22
param (
33
[Parameter(Mandatory)]
44
[ValidateScript({ $_.objectClass -eq 'pKIEnrollmentService' })]
55
[System.DirectoryServices.DirectoryEntry]$EnrollmentService,
66
[Parameter(Mandatory)]
7-
[string]$EnrollmentServiceFullName
7+
[string]$EnrollmentServiceFullName
88
)
99

1010
"$($EnrollmentService.dNSHostName)\$($EnrollmentService.name)"
11-
}
11+
}

ADCSGoat/Public/Set-AdcsGoatTemplateAce.ps1 renamed to ADCSGoat/Public/Set-AGTemplateAce.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function Set-AdcsGoatTemplateAce {
1+
function Set-AGTemplateAce {
22
[CmdletBinding()]
33
param (
44
[Parameter(ValueFromPipeline, Mandatory)]
@@ -20,7 +20,7 @@ function Set-AdcsGoatTemplateAce {
2020
# Define principals for use in ACEs
2121
# $Administrators = New-Object System.Security.Principal.SecurityIdentifier('S-1-5-32-544')
2222
$AuthenticatedUsers = New-Object System.Security.Principal.SecurityIdentifier('S-1-5-11')
23-
23+
2424
# Define Active Directory Rights for use in ACEs
2525
$ExtendedRight = [System.DirectoryServices.ActiveDirectoryRights]::ExtendedRight
2626
$GenericAll = [System.DirectoryServices.ActiveDirectoryRights]::GenericAll
@@ -45,7 +45,7 @@ function Set-AdcsGoatTemplateAce {
4545
New-Object System.DirectoryServices.ActiveDirectoryAccessRule $AuthenticatedUsers, $ExtendedRight, $Allow, $EnrollGUID
4646
New-Object System.DirectoryServices.ActiveDirectoryAccessRule $AuthenticatedUsers, $GenericRead, $Allow, $AllPropertiesGUID
4747
)
48-
}
48+
}
4949
'FullControl|GenericAll' {
5050
New-Object System.DirectoryServices.ActiveDirectoryAccessRule $AuthenticatedUsers, $GenericAll, $Allow, $AllPropertiesGUID
5151
}
@@ -59,15 +59,15 @@ function Set-AdcsGoatTemplateAce {
5959
Write-Output $TemplateName -PipelineVariable name | ForEach-Object {
6060
$success = $false
6161
$TemplateObject = New-Object System.DirectoryServices.DirectoryEntry("LDAP://CN=$name,$TemplateContainer")
62-
62+
6363
while (-not $success) {
6464
# Get the current ACL
6565
$ACL = try {
6666
$TemplateObject.ObjectSecurity
6767
} catch {
6868
throw "Could not collect ACL from $name (CN=$name,$TemplateContainer). Do you have rights to read the template object?"
6969
}
70-
70+
7171
# Add each access rule to the ACL
7272
Write-Output $AccessRule -PipelineVariable ace | ForEach-Object {
7373
$ACL.AddAccessRule($ace)

ADCSGoat/Public/Set-AdcsGoatTemplateProperty.ps1 renamed to ADCSGoat/Public/Set-AGTemplateProperty.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function Set-AdcsGoatTemplateProperty {
1+
function Set-AGTemplateProperty {
22
[CmdletBinding()]
33
param (
44
[Parameter(ValueFromPipeline, Mandatory)]

0 commit comments

Comments
 (0)