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 Server130円\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 Server130円\Tools\Binn\ManagementStudio\ssms.pkgundef'"
SSMS 17
powershell -Command "(gc 'C:\Program Files (x86)\Microsoft SQL Server140円\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 Server140円\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.
2 Answers 2
Thanks to David Browne,
I used procmon and could find the settings are stored in the below regedit section,
Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\SQL Server Management Studio18円.0_IsoShell\General
MRUListItemCount
WindowMenuItemCount
Change these values to 1-24
You could use Process Monitor https://learn.microsoft.com/en-us/sysinternals/downloads/procmon to discover where SSMS stores these settings.
-
Thank you David,
Process Monitor
is really very usefulMarcello Miorelli– Marcello Miorelli2021年07月19日 09:34:31 +00:00Commented Jul 19, 2021 at 9:34
Explore related questions
See similar questions with these tags.
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/…