Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Invoke-Locksmith.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2795,7 +2795,6 @@ function Set-AdditionalCAProperty {
)

begin {
$CAEnrollmentEndpoint = @()
if (-not ([System.Management.Automation.PSTypeName]'TrustAllCertsPolicy') ) {
if ($PSVersionTable.PSEdition -eq 'Desktop') {
$code = @"
Expand Down Expand Up @@ -2829,6 +2828,7 @@ function Set-AdditionalCAProperty {

process {
$ADCSObjects | Where-Object objectClass -Match 'pKIEnrollmentService' | ForEach-Object {
$CAEnrollmentEndpoint = @()
#[array]$CAEnrollmentEndpoint = $_.'msPKI-Enrollment-Servers' | Select-String 'http.*' | ForEach-Object { $_.Matches[0].Value }
foreach ($directory in @("certsrv/", "$($_.Name)_CES_Kerberos/service.svc", "$($_.Name)_CES_Kerberos/service.svc/CES", "ADPolicyProvider_CEP_Kerberos/service.svc", "certsrv/mscep/")) {
$URL = "://$($_.dNSHostName)/$directory"
Expand Down Expand Up @@ -4381,7 +4381,7 @@ function Invoke-Locksmith {
[System.Management.Automation.PSCredential]$Credential
)

$Version = '2025.1.14'
$Version = '2025.2.22'
$LogoPart1 = @'
_ _____ _______ _ _ _______ _______ _____ _______ _ _
| | | | |____/ |______ | | | | | |_____|
Expand Down Expand Up @@ -4612,7 +4612,7 @@ Invoke-Locksmith -Mode 1
$Output = Join-Path -Path $OutputPath -ChildPath "$FilePrefix ADCSIssues.CSV"
Write-Host "Writing AD CS issues to $Output..."
try {
$AllIssues | Select-Object Forest, Technique, Name, Issue | Export-Csv -NoTypeInformation $Output
$AllIssues | Select-Object Forest, Technique, Name, Issue, @{l = 'Risk'; e = { $_.RiskName } } | Export-Csv -NoTypeInformation $Output
Write-Host "$Output created successfully!`n"
}
catch {
Expand All @@ -4623,7 +4623,7 @@ Invoke-Locksmith -Mode 1
$Output = Join-Path -Path $OutputPath -ChildPath "$FilePrefix ADCSRemediation.CSV"
Write-Host "Writing AD CS issues to $Output..."
try {
$AllIssues | Select-Object Forest, Technique, Name, DistinguishedName, Issue, Fix | Export-Csv -NoTypeInformation $Output
$AllIssues | Select-Object Forest, Technique, Name, DistinguishedName, Issue, Fix, @{l = 'Risk'; e = { $_.RiskName } }, @{l = 'Risk Score'; e = { $_.RiskValue } }, @{l = 'Risk Score Detail'; e = { $_.RiskScoring -join "`n" } } | Export-Csv -NoTypeInformation $Output
Write-Host "$Output created successfully!`n"
}
catch {
Expand Down
2 changes: 1 addition & 1 deletion Locksmith.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
FunctionsToExport = 'Invoke-Locksmith'
GUID = 'b1325b42-8dc4-4f17-aa1f-dcb5984ca14a'
HelpInfoURI = 'https://raw.githubusercontent.com/jakehildreth/Locksmith/main/en-US/'
ModuleVersion = '2025.1.14'
ModuleVersion = '2025.2.22'
PowerShellVersion = '5.1'
PrivateData = @{
PSData = @{
Expand Down
4 changes: 2 additions & 2 deletions Public/Invoke-Locksmith.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ Invoke-Locksmith -Mode 1
$Output = Join-Path -Path $OutputPath -ChildPath "$FilePrefix ADCSIssues.CSV"
Write-Host "Writing AD CS issues to $Output..."
try {
$AllIssues | Select-Object Forest, Technique, Name, Issue | Export-Csv -NoTypeInformation $Output
$AllIssues | Select-Object Forest, Technique, Name, Issue, @{l = 'Risk'; e = { $_.RiskName } } | Export-Csv -NoTypeInformation $Output
Write-Host "$Output created successfully!`n"
} catch {
Write-Host 'Ope! Something broke.'
Expand All @@ -351,7 +351,7 @@ Invoke-Locksmith -Mode 1
$Output = Join-Path -Path $OutputPath -ChildPath "$FilePrefix ADCSRemediation.CSV"
Write-Host "Writing AD CS issues to $Output..."
try {
$AllIssues | Select-Object Forest, Technique, Name, DistinguishedName, Issue, Fix | Export-Csv -NoTypeInformation $Output
$AllIssues | Select-Object Forest, Technique, Name, DistinguishedName, Issue, Fix, @{l = 'Risk'; e = { $_.RiskName } }, @{l = 'Risk Score'; e = { $_.RiskValue } }, @{l = 'Risk Score Detail'; e = { $_.RiskScoring -join "`n" } } | Export-Csv -NoTypeInformation $Output
Write-Host "$Output created successfully!`n"
} catch {
Write-Host 'Ope! Something broke.'
Expand Down