System command

setspn command

This guide gathers the Microsoft Learn syntax and parameter reference for setspn, a Windows command or tool subcommand. Availability can depend on Windows version, role, optional feature and execution context.

Availability: Microsoft Learn command reference spanning Windows client and Windows Server releases; some entries are legacy, role-specific, optional-feature or interactive subcommands.中文

Documented syntax

setspn <modifiers switch> <accountname> [-R] [-S] [-D] [-L] [-C] [-U] [-Q] [-X] [-P] [-F] [-T] [-?] [/?]

The linked Microsoft Learn article is the upstream authority. Availability may depend on Windows release, role, optional feature or interactive tool context.

Syntax pattern

Syntax pattern from Microsoft Learn; replace placeholders and choose only one documented alternative before use.

setspn <modifiers switch> <accountname> [-R] [-S] [-D] [-L] [-C] [-U] [-Q] [-X] [-P] [-F] [-T] [-?] [/?]

Parameters, options and clauses

Option / clauseDescription
<accountname>Microsoft documents this argument or subcommand; check the linked reference for its required format and context.
-RMicrosoft documents this switch; use the linked reference for accepted values, effects and version limits.
-SMicrosoft documents this switch; use the linked reference for accepted values, effects and version limits.
-DMicrosoft documents this switch; use the linked reference for accepted values, effects and version limits.
-LMicrosoft documents this switch; use the linked reference for accepted values, effects and version limits.
-CMicrosoft documents this switch; use the linked reference for accepted values, effects and version limits.
-UMicrosoft documents this switch; use the linked reference for accepted values, effects and version limits.
-QMicrosoft documents this switch; use the linked reference for accepted values, effects and version limits.
-XMicrosoft documents this switch; use the linked reference for accepted values, effects and version limits.
-PMicrosoft documents this switch; use the linked reference for accepted values, effects and version limits.
-FMicrosoft documents this switch; use the linked reference for accepted values, effects and version limits.
-TMicrosoft documents this switch; use the linked reference for accepted values, effects and version limits.
-?Display command help or the supported command-line usage.
/?Display command help or the supported command-line usage.
Safety note

Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.

Official reference ↗Back to directory