SqlSpnManager

« All commands

Get-SqlSpnInfrastructure Resolves SPN-relevant infrastructure facts for a target SQL host or virtual name.

Read-Only SqlSpnManager v1.4.0

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

Recipe 1
EXAMPLE 1
Get-SqlSpnInfrastructure -Scenario Standalone -TargetName SQLSRV01
Recipe 2
EXAMPLE 2
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

-Scenario required String
The infrastructure type: Standalone, AlwaysOn, or FCI. (MSDTC deferred per DR-309.)
-TargetName required String
The DNS name (or shortname) of the server, virtual computer, or listener.
-ManualPort optional Int32
Override the automatic port discovery.
-InstanceName optional String
SQL instance name. Defaults to MSSQLSERVER (default instance).

Was this page helpful? Report an issue or suggest an improvement →