SqlSpnManager

« All commands

Get-SqlSpnAccount Verifies and retrieves a standard Active Directory account.

Read-Only SqlSpnManager v1.4.0

Description

First step of the SPN management pipeline. Ensures the supplied service account or gMSA exists in Active Directory and returns a normalized descriptor used by downstream functions (New-SqlSpnPlan, Invoke-SqlSpnExecutionEngine). On lookup failure, emits a non-terminating error so callers can decide whether to abort the pipeline or recover.

Recipes

Recipe 1
EXAMPLE 1
Get-SqlSpnAccount -SamAccountName 'svc_sql_prod'
Recipe 2
EXAMPLE 2
$acct = Get-SqlSpnAccount -SamAccountName 'SQLFCI01
if ($acct.ObjectClass -eq 'computer') { 'OK for FCI Engine SPN' }

Notes

Requires the ActiveDirectory PowerShell module and a reachable domain controller. On non-domain-joined hosts this command will fail at the Get-ADObject call.

Parameters

-SamAccountName required String
The SAM account name (e.g., svc_sql_prod or SQLFCI01$).

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