The New-PrintSpnAuditPlan command from the SpnManager module provides a comprehensive way to identify potential security risks in Active Directory (AD) by comparing expected HOST/RPCSS Service Principal Names (SPNs) against those stored in the AD machine account. This process helps ensure that services are properly registered with AD, reducing the risk of unexpected behavior or unauthorized access.
Key benefits:
- Identifies missing and orphaned SPNs
- Reduces security risks by ensuring accurate service registration
- Can be used to enforce compliance with organizational security policies
Managers should care about this command when: * Migrating services between machines or domains * Integrating with other security tools or processes * Addressing security vulnerabilities or incidents
To use New-PrintSpnAuditPlan, follow these steps:
- Import the SpnManager module using
Import-Module - Create a candidate object by specifying the cluster computer’s sAMAccountName in the
Candidateparameter, like this:$candidate = Get-ClusterComputer -Name "ClusterName" | Select-Object sAMAccountName - Run the command with the candidate object as an argument:
New-PrintSpnAuditPlan -Candidate $candidate
Example output:
MissingSPNs : {HOST/Machine1, RPCSS/Machine2}
OrphanedSPNs : {RPCSS/Service1, HOST/Service2}
Watchpoints:
- Ensure the SpnManager module is up-to-date and installed correctly
- Use the
ClusterVNNparameter to specify the cluster computer’s sAMAccountName
Common patterns: * Run the command periodically as part of a scheduled task or script * Integrate with other security tools or processes to automate remediation tasks
Here’s what you need to know about New-PrintSpnAuditPlan:
What it does: Compares expected HOST/RPCSS SPNs against those stored in the AD machine account, identifying missing and orphaned SPNs.
Step-by-step:
- Import the SpnManager module.
- Create a candidate object using Get-ClusterComputer or another method.
- Run New-PrintSpnAuditPlan with the candidate object as an argument.
What to do when stuck: Consult the documentation, check for software updates, and seek assistance from a support team if needed.
| 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.PrintSpooler |
| 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-PrintSpnAuditPlan command handles data as follows:
- Data in transit: No sensitive information is transmitted between systems.
- Data at rest: Only expected and actual SPNs are stored, reducing the risk of unauthorized access or exposure.
- Audit trail: The command logs its output to the console, allowing for auditing and compliance tracking.
Compliance requirements:
- Follow organizational security policies and procedures
- Regularly review and update expected SPNs in AD
- Run the
New-PrintSpnAuditPlancommand periodically to identify potential security risks.
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.PrintSpooler.
Example 1
Get-PrintSpnCandidate -TargetComputer 'printserver01' | New-PrintSpnAuditPlanAlso uses: Get-PrintSpnCandidate (Sense).
Example 2
New-PrintSpnAuditPlan -Candidate $candidateExample 3
Get-PrintSpnCandidate -TargetComputer 'srv01' | New-PrintSpnAuditPlan | Test-SpnAuditPlanAlso uses: Get-PrintSpnCandidate (Sense), Test-SpnAuditPlan (Test).