0

in order to enable the dark theme to SSMS (not available on the picture below as you see):

enter image description here

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 darktheme to SSMS. It works, but needs to be done manually.

enter image description here

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:

enter image description here

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:

  1. set the colour Theme as Dark
  2. 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.

enter image description here

asked Jul 15, 2021 at 16:02
1
  • 1
    Maybe you could use 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/… Commented Jul 15, 2021 at 18:56

2 Answers 2

1

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

answered Jul 17, 2021 at 15:51
1

You could use Process Monitor https://learn.microsoft.com/en-us/sysinternals/downloads/procmon to discover where SSMS stores these settings.

answered Jul 15, 2021 at 17:13
1
  • Thank you David, Process Monitor is really very useful Commented Jul 19, 2021 at 9:34

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.