Skip to content

Set-DbaPrivilege: Use per-service SID (NT SERVICE\ServiceName) for IFI, LPIM, SecAudit#10228

Merged
potatoqualitee merged 1 commit intodevelopmentfrom
claude/issue-9344-20260311-0715
Mar 12, 2026
Merged

Set-DbaPrivilege: Use per-service SID (NT SERVICE\ServiceName) for IFI, LPIM, SecAudit#10228
potatoqualitee merged 1 commit intodevelopmentfrom
claude/issue-9344-20260311-0715

Conversation

@andreasjordan
Copy link
Collaborator

Use NT SERVICE<ServiceName> per-service SIDs instead of StartName for SeManageVolumePrivilege (IFI), SeLockMemoryPrivilege (LPIM), and SeAuditPrivilege (SecAudit).

SQL Server uses the per-service SID in its process token for these operations, matching SQL Server setup.exe behavior. Logon rights (BatchLogon, ServiceLogon) continue to use the StartName account.

Closes #9344

Generated with Claude Code

Use NT SERVICE\<ServiceName> per-service SIDs instead of StartName for
SeManageVolumePrivilege (IFI), SeLockMemoryPrivilege (LPIM), and
SeAuditPrivilege (SecAudit). SQL Server uses the per-service SID in its
process token for these operations, matching SQL Server setup.exe behavior.

Logon rights (BatchLogon, ServiceLogon) continue to use the StartName
account, as these are authentication privileges tied to the actual account.

When -User is specified explicitly, that account is used for all privilege
types as before.

Fixes #9344

(do Set-DbaPrivilege)

Co-authored-by: Andreas Jordan <andreasjordan@users.noreply.github.com>
@potatoqualitee potatoqualitee merged commit 5e0b70d into development Mar 12, 2026
15 checks passed
@potatoqualitee potatoqualitee deleted the claude/issue-9344-20260311-0715 branch March 12, 2026 12:55
@potatoqualitee
Copy link
Member

hell yeah 🙌🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set-DbaPrivilege: Which account should be used to grant SeManageVolumePrivilege?

2 participants