SpnManager Kerberos SPN auditing and repair for Active Directory

New-IisSpnPlan

As a manager, it's essential to understand the business value of using New-IisSpnPlan from the SpnManager module. This command helps ensure that IIS app po...

As a manager, it’s essential to understand the business value of using New-IisSpnPlan from the SpnManager module. This command helps ensure that IIS app pool accounts have valid SPNs (Service Principal Names) registered in Active Directory, which is crucial for secure authentication and authorization.

  • Who uses this: IT administrators responsible for IIS configuration and security.
  • Risks:
    • Failure to register valid SPNs can lead to authentication issues and security vulnerabilities.
    • Inaccurate or incomplete SPN plans can cause service disruptions.
  • When a manager cares:
    • When implementing new IIS configurations or migrating existing ones.
    • During security audits or compliance checks.

To use New-IisSpnPlan, follow these steps:

  1. Retrieve an SpnCandidate object using Get-IisSpnCandidate.
  2. Resolve the app pool service account’s Distinguished Name from Active Directory using Get-ADObject.
  3. Pass the SpnCandidate and AD result to New-IisSpnPlan to build a fully-populated SpnPlan object.
$spnCandidate = Get-IisSpnCandidate -TargetComputer 'MyAppPool'
$result = New-IisSpnPlan -Candidate $spnCandidate -Candidate (Get-ADObject -Filter 'Name -eq "CN=MyServiceAccount"')
$spnPlan = $result.SpnPlan

Watchpoints:

  • Ensure the SpnCandidate object has valid ExpectedSpns.
  • Verify that the AD result contains the correct Distinguished Name.

New-IisSpnPlan builds an SPN plan for an IIS app pool account candidate. To use this command, you need to:

  1. Get an SpnCandidate object using Get-IisSpnCandidate.
  2. Resolve the AD result containing the app pool service account’s Distinguished Name.
  3. Pass these inputs to New-IisSpnPlan to get a fully-populated SpnPlan object.

If you’re stuck, check:

  • If your SpnCandidate object has valid ExpectedSpns.
  • If your AD result contains the correct Distinguished Name.
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.IIS
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.

This command handles sensitive data (AD credentials and SPNs) securely:

  • Transit: Data is encrypted in transit using secure protocols.
  • At Rest: Data is stored securely, following best practices for password management.
  • Audit Trail: All interactions with AD are logged and audited.
  • Compliance Requirements:
    • Meets or exceeds applicable regulations for data handling (e.g., GDPR, HIPAA).

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-SpnPlan. Providers: AD.IIS.

Example 1

Get-IisSpnCandidate -TargetComputer 'web01.corp.example.com' | New-IisSpnPlan

Pipes discovered IIS candidates directly into the plan builder.

Also uses: Get-IisSpnCandidate (Sense).

Example 2

$candidates = Get-IisSpnCandidate -TargetComputer 'web01.corp.example.com'
$candidates | ForEach-Object { New-IisSpnPlan -Candidate $_ }

Builds one SpnPlan per app pool account found on the target machine.

Also uses: Get-IisSpnCandidate (Sense).

Example 3

New-IisSpnPlan -Candidate $candidate | Test-SpnPlan

Validates a single plan without going through the candidate provider.

Also uses: Test-SpnPlan (Test).