in order to enable the dark theme to SSMS (not available on the picture below as you see):
following this webpage:
SQL SERVER Management Studio 18 - Enable Dark Theme - SQL Authority with Pinal Dave
there are clear instructions as how to add the dark
theme to SSMS. It works, but needs to be done manually.
now on this site below, there is the same set of instructions plus
a way to get it done via powershell, as I have added here below, and it works, but powershell needs to be run as administrator.
Setting up the dark theme in SQL Server management studio (sqlshack.com)
Depending on the version of SSMS, copy the appropriate script into the clipboard, paste it in PowerShell and hit Enter to execute it:
SSMS 2016
powershell -Command "(gc 'C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio\ssms.pkgundef') -replace '\[\`$RootKey\`$\\Themes\\{1ded0138-47ce-435e-84ef-9ec1f439b749}\]', '//[`$RootKey`$\Themes\{1ded0138-47ce-435e-84ef-9ec1f439b749}]' | Out-File 'C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio\ssms.pkgundef'"
SSMS 17
powershell -Command "(gc 'C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\ssms.pkgundef') -replace '\[\`$RootKey\`$\\Themes\\{1ded0138-47ce-435e-84ef-9ec1f439b749}\]', '//[`$RootKey`$\Themes\{1ded0138-47ce-435e-84ef-9ec1f439b749}]' | Out-File 'C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\ssms.pkgundef'"
SSMS 18
powershell -Command "(gc 'C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\ssms.pkgundef') -replace '\[\`$RootKey\`$\\Themes\\{1ded0138-47ce-435e-84ef-9ec1f439b749}\]', '//[`$RootKey`$\Themes\{1ded0138-47ce-435e-84ef-9ec1f439b749}]' | Out-File 'C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\ssms.pkgundef'"
Powershell as administrator running the command above:
Now my question, I am not sure whether it is possible or not. Basically I would like to find out where these SSMS settings are saved, and change them preferably via powershell:
- set the colour Theme as
Dark
- Items shown on the windows menu - currently 10, I would like to change that to 24
is it at all possible?
I have many servers where SSMS lives, and I would like to set them all to the same settings.
I am wondering if I could get this done using SendKeys.
that added the dark
theme - made it available for me to choose it as you can see on the picture below.
Invoke-Command
to execute it on all servers remotely, you would need to execute as a user that has local admin rights on all those servers learn.microsoft.com/en-us/powershell/module/…