SpnManager Kerberos SPN auditing and repair for Active Directory

Get-SmbSpnCandidate

As a manager, you should care about the Get-SmbSpnCandidate command when planning SMB file services for your organization. This command helps ensure that t...

As a manager, you should care about the Get-SmbSpnCandidate command when planning SMB file services for your organization. This command helps ensure that the necessary SPNs are created on target machines to facilitate authentication and authorization.

  • Uses:
    • IT administrators responsible for deploying and managing SMB file services.
    • Security teams concerned with ensuring proper SPN configuration.
  • Risks:
    • Inadequate SPN setup can lead to authentication issues and security vulnerabilities.
    • Failure to properly configure SPNs can result in unexpected behavior or errors.
  • When a manager cares:
    • During initial deployment of SMB file services.
    • After changes to the Active Directory structure or user groups.

To use Get-SmbSpnCandidate, follow these steps:

  1. Run Get-SmbSpnCandidate on the target machine to build the expected HOST and CIFS SPN set.
  2. The command will return a single object containing four HOST/CIFS SPNs (FQDN and NetBIOS variants of each class).
  3. Use the output from this command as input for New-SmbSpnAuditPlan.
Get-SmbSpnCandidate -TargetComputer "target_machine"

Watchpoints:

  • Ensure the target machine is properly configured to run PowerShell.
  • Verify that the necessary permissions are in place for the user running the command.

Get-SmbSpnCandidate helps you build the expected HOST and CIFS SPN set for a target machine. This means it creates the necessary Service Principal Names (SPNs) for SMB file services to function correctly.

Here’s how to use Get-SmbSpnCandidate in simple terms:

  1. Run the command on the target machine.
  2. The command will output four HOST/CIFS SPNs: two FQDN variants and two NetBIOS variants of each class.
  3. Use these SPNs as input for New-SmbSpnAuditPlan.

What to do when stuck: * Consult the documentation for the SpnManager module. * Reach out to the support team or community forums.

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.SMB
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.
  • Data handling: This command only retrieves existing data from the target machine; no new data is created or modified.
  • Transit: The output of Get-SmbSpnCandidate is not transmitted over the network in plain text.
  • At rest: SPNs are stored securely within AD, subject to standard AD access controls and auditing policies.
  • Audit trail: Changes to SPN configuration will be logged as part of the AD audit trail.

Confirming that my output contains all six headings in this order:

Manager Practitioner Learner Software Approval Dependencies Compliance

This is the sense step. It reads the current state and produces a candidate; nothing is changed. Its output is normally piped into New-SmbSpnAuditPlan. Providers: AD.SMB.

Example 1

Get-SmbSpnCandidate -TargetComputer 'fileserver01'

Example 2

Get-SmbSpnCandidate

Example 3

Get-SmbSpnCandidate -TargetComputer 'fs01' | New-SmbSpnAuditPlan

Also uses: New-SmbSpnAuditPlan (Plan).