Invoke-SpnLifecycle
Runs the SpnManager SPN lifecycle for a registered provider.
This is the one command most people run first. Give it a provider ID and it walks the whole lifecycle for that provider: it senses what is running, proposes the SPN set, tests the plan against AD, and then either implements the change or, for audit-only providers, produces a hand-off bundle.
Nothing is written to AD unless the provider has a write path and you did not pass -WhatIf. For any provider whose far side holds a keytab, the final stage is always a runbook.
- -ProviderId
- Registry ID of the provider to run, for example
SQL.EngineorAD.RDP. Must match a registered provider with Status = Implemented. Mandatory. - -TargetComputer
- Host to target. Forwarded to each stage function that declares a TargetComputer parameter; local-only sense functions receive nothing.
- -PassThru
- Return the final stage result object to the pipeline. Without it, progress goes to Write-Verbose only.
- -WhatIf / -Confirm
- Standard ShouldProcess switches. -WhatIf shows what the Implement stage would do without changing AD.
Nothing by default. With -PassThru: the result object from the final stage — SpnExecutionResult, SpnAuditResult, or a hand-off bundle.
| stage | receives | notes |
|---|---|---|
| Sense | TargetComputer, if accepted | |
| Propose | Candidate + TargetComputer | |
| Test | Plan + TargetComputer | blocks on unresolved conflict |
| Implement | Plan + TargetComputer | ShouldProcess-gated |
| Handoff | Plan + TargetComputer | audit-only providers |
{{ tok.WIKI_BUILD_ID }}report an error on this page