The New-AdcsSpnAuditPlan command is a key component of the AD CS infrastructure management process. Its primary purpose is to identify potential security vulnerabilities by comparing expected Service Principal Names (SPNs) with actual SPNs registered in Active Directory.
Business value:
- Ensures secure and consistent registration of service endpoints
- Helps prevent unauthorized services from accessing sensitive resources
- Facilitates compliance with industry standards and regulations
Who uses this:
- AD CS administrators responsible for managing CA infrastructure
- Security teams that monitor and audit AD environments
- Compliance officers who ensure adherence to regulatory requirements
Risks:
- Inconsistent or missing SPNs can lead to security breaches
- Failure to detect orphaned SPNs can result in unauthorized access
- Non-compliance with industry standards and regulations can attract penalties
When a manager cares:
- When an audit reveals inconsistent or missing SPNs
- When a security incident occurs due to unknown service endpoints
- When compliance reports indicate non-adherence to industry standards
To use New-AdcsSpnAuditPlan, follow these steps:
- Run the command with the
-Credentialparameter to authenticate with AD:
Get-AdcsSpnCandidate -TargetComputer 'ca01.corp.example.com' | New-AdcsSpnAuditPlan- Filter SPNs using the
-Filterparameter to narrow down results:
$candidate = Get-AdcsSpnCandidate -TargetComputer 'ca01.corp.example.com'
New-AdcsSpnAuditPlan -Candidate $candidate- Compute missing and orphaned SPNs using the default settings:
New-AdcsSpnAuditPlanWatchpoints:
- Ensure AD CS infrastructure is properly configured before running this command
- Regularly review results to detect potential security vulnerabilities
Code examples:
# Sense the certificate authority, then compute missing and orphaned SPNs
$candidate = Get-AdcsSpnCandidate -TargetComputer 'ca01.corp.example.com'
$result = New-AdcsSpnAuditPlan -Candidate $candidate
# Keep the finding for a change ticket
$result | Export-Csv -Path 'C:\Reports\adcs-spn-audit.csv' -NoTypeInformationNew-AdcsSpnAuditPlan is a PowerShell command that helps identify potential security risks in AD CS infrastructure. Here’s what it does:
- Reads the CA machine account’s ServicePrincipalName attribute from AD.
- Filters SPNs to RPCSS/* and HTTP/* entries only.
- Computes missing (expected - actual) and orphaned (actual - expected) SPNs.
Simple recipe:
- Run
New-AdcsSpnAuditPlanwith default settings. - Review output for missing or orphaned SPNs.
What to do when stuck:
- Check AD CS infrastructure configuration and ensure proper authentication.
- Consult PowerShell documentation for troubleshooting tips.
| Field | Value |
|---|---|
| Vendor | Detent Point LLC |
| Product | SpnManager 0.4.0 |
| Licence | Proprietary - licensed, not sold. See LICENSE. |
| Operational impact | Read-only. Queries Active Directory and reports findings; changes nothing. |
| Rights required | Directory read access. Some providers additionally need rights to read delegation and encryption-type attributes. |
| Providers covered | AD.ADCS |
| Approval recommendation | Approve for general operational use. It cannot alter directory state. |
Licence terms are proprietary and are supplied with the purchase, subscription or evaluation agreement. No open-source licence is granted.
| What | Why |
|---|---|
| Windows PowerShell 5.1 or later | Declared by the module manifest. |
| ActiveDirectory 1.0.0.0 | Required module. Ships with RSAT; install the Active Directory PowerShell feature. |
| A reachable domain controller | Every provider reads from Active Directory. |
| An account with directory read access | Needed to enumerate accounts and their SPNs. |
The New-AdcsSpnAuditPlan command handles sensitive data securely:
- Data is retrieved from Active Directory using authenticated connections.
- Results are computed locally, minimizing transit and storage requirements.
- An audit trail is not maintained by default; consider logging options for compliance.
Compliance requirements:
- Aligns with industry standards (e.g., NIST 800-53, ISO 27001).
- Ensures data protection through secure authentication and access control.
This is the plan step. It turns a candidate into a plan showing what is missing; nothing is changed. Its output is normally piped into Test-SpnAuditPlan. Providers: AD.ADCS.
Example 1
Get-AdcsSpnCandidate -TargetComputer 'ca01.corp.example.com' | New-AdcsSpnAuditPlanAlso uses: Get-AdcsSpnCandidate (Sense).
Example 2
New-AdcsSpnAuditPlan -Candidate $candidateExample 3
Get-AdcsSpnCandidate -TargetComputer 'srv01' | New-AdcsSpnAuditPlan | Test-SpnAuditPlanAlso uses: Get-AdcsSpnCandidate (Sense), Test-SpnAuditPlan (Test).