As a manager, the Get-IisSpnCandidate command from the SpnManager module provides valuable insights into IIS site bindings and their associated HTTP SPN candidates. This information is crucial for ensuring proper Kerberos authentication and authorization in your organization.
- Who uses this: IT administrators, security engineers, and DevOps teams responsible for configuring and managing IIS sites.
- Risks:
- Inadequate or incorrect configuration of IIS site bindings can lead to authentication failures and security breaches.
- Failure to detect and correct SPN issues can result in delayed troubleshooting and resolution.
- When a manager cares: During:
- Initial setup and configuration of new IIS sites.
- Periodic reviews and updates of existing IIS configurations.
- Incident response and root cause analysis for authentication-related issues.
To use Get-IisSpnCandidate, follow these steps:
- Ensure the SpnManager module is installed on your system.
- Connect to an IIS server or a remote PowerShell session using the
-Bindingsparameter for test injection:
$bindings = @(
[PSCustomObject]@{
HostHeader = "example.com"
Port = 80
AppPoolAccount = "myapppoolaccount"
},
[PSCustomObject]@{
HostHeader = ""
Port = 8080
AppPoolAccount = "anotheraccount"
}
)
Get-IisSpnCandidate -Bindings $bindings- Monitor for output indicating potential SPN issues:
SPN Candidates:
+ http/example.com
+ http/example.com:80Get-IisSpnCandidate helps detect IIS site bindings and identifies potential HTTP SPN candidates. Follow these simple steps to use this command:
- Install the SpnManager module on your system.
- Connect to an IIS server or a remote PowerShell session.
- Use the
-Bindingsparameter for test injection (optional). - Run
Get-IisSpnCandidateto get the SPN candidates.
If you encounter issues, ensure:
- The SpnManager module is installed correctly.
- You have the necessary permissions to access IIS configurations.
- The input bindings are formatted correctly.
| 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. |
Data handling and compliance requirements:
- Data transit: This command does not transmit sensitive data.
- Data at rest: The output is stored in memory only; no files are created or modified.
- Audit trail: Log entries are generated only for errors and warnings.
- Compliance requirements:
This is the sense step. It reads the current state and produces a candidate; nothing is changed. Its output is normally piped into New-IisSpnPlan. Providers: AD.IIS.
Example 1
Get-IisSpnCandidateEnumerates IIS bindings on the local machine and returns one SpnCandidate per unique app pool account.
Example 2
Get-IisSpnCandidate -TargetComputer 'web01.corp.example.com'Enumerates IIS bindings on a remote machine. Requires the Microsoft.Web.Administration assembly and appropriate permissions.
Example 3
$b = @([PSCustomObject]@{HostHeader='app.corp.example.com'; Port=443; AppPoolAccount='corp\svc-web'})
Get-IisSpnCandidate -TargetComputer 'web01.corp.example.com' -Bindings $bUses injected binding data — no IIS assembly required. Useful in test contexts.