Get-SqlSpnInfrastructure Resolves SPN-relevant infrastructure facts for a target SQL host or virtual name.
Description
Builds the Infrastructure object that New-SqlSpnPlan consumes. Resolves FQDN from shortname using the local domain, sniffs the actual TCP port via Get-SqlActualPort (registry), detects cross-forest registration by comparing the target's DNS suffix to the local USERDNSDOMAIN, and propagates the scenario tag (Standalone / AlwaysOn / FCI) through to the plan builder.
Recipes
Get-SqlSpnInfrastructure -Scenario Standalone -TargetName SQLSRV01
Get-SqlSpnInfrastructure -Scenario FCI -TargetName SQLFCI01.contoso.com -ManualPort 55001
Notes
Cross-forest detection compares the target's DNS suffix to $env:USERDNSDOMAIN. On a workgroup or non-domain-joined host the cross-forest flag is conservative (false) and downstream callers may need to manually set the -T flag via Invoke-SqlSpnNativeCall.
Parameters
Was this page helpful? Report an issue or suggest an improvement →