dataplat / dbatools

🚀 SQL Server automation and instance migrations have never been safer, faster or freer
https://dbatools.io
MIT License
2.39k stars 787 forks source link

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

Open andreasjordan opened 1 month ago

andreasjordan commented 1 month ago

This is based on our findings that we documented here: https://blog.ordix.de/instant-file-initialization-microsoft-sql-server-set-up-check

TL;DR: setup.exe uses "NT SERVICE\MSSQLSERVER", the Configuration Manager uses "LABDOM\SQLServerGMSA$".

We currently use "LABDOM\SQLServerGMSA$" with Set-DbaPrivilege. And we use Set-DbaPrivilege in Install-DbaInstance.

First of all I would like to change Install-DbaInstance to use the setup.exe parameter SQLSVCINSTANTFILEINIT when installing version 2016 or later. That would allign the behavior to the setup.exe GUI. Update: This was changed, so we use SQLSVCINSTANTFILEINIT now for SQL Server 2016 and newer.

But I would also question the use of the StartName property inside of Set-DbaPrivilege. Does anyone have a contact to the SQL Server development team to get their opinion?