PSM - How to configure a PSM Connection Component for SQL Server Management Studio

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
PAM Self-Hosted Articles
7 min read
L0 Member
No ratings

Environment

PVWA and PSM

Resolution

ka3Vy000008GLrtIAG__eid=ka3Vy000008GLrt&feoid=00N2J000009R3kp&refid=0EM2J0000019Iyk.png

  1. On the PSM machine, install the Microsoft SQL Server Database Administration Tool. SQL Server Management Studio can be obtained from the Microsoft website. 
  2. The PSM AppLocker configuration is saved in the PSMConfigureAppLocker.xml configuration file and must be edited manually before you run the configuration script.
  3. Remove the read-only permissions from the PSMConfigureAppLocker.xml file.
  4. In the Hardening subfolder of the PSM installation folder, open the PSMConfigureAppLocker.xml configuration file and edit it as follows
  5. Configure the AppLocker to permit SQL Server Management Studio to run on the PSM server
    1. Modify the SQL Server Management Studio <version> processes section, please change the path of the ssms.exe accordingly as per the env:
      Caption

      SQL Server Management Studio Version

      Add

      2008

      <Application Name="SSMS2008" Type="Exe" Path="C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe" Method="Publisher" />

      2012

      <Application Name="SSMS2012" Type="Exe" Path="C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\Ssms.exe" Method="Publisher" />

      2016

      <Application Name="SSMS2016" Type="Exe" Path="C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio\Ssms.exe" Method="Publisher" />

      2017

      <Application Name="SSMS2017" Type="Exe" Path="C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\Ssms.exe" Method="Publisher" />

      2018

      <Application Name="SSMS18" Type="Exe" Path="C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\Ssms.exe" Method="Publisher" />

      2022

      <Application Name="SSMS19" Type="Exe" Path="C:\Program Files\Microsoft SQL Server Management Studio 19\Common7\IDE\Ssms.exe" Method="Publisher" />

      2025

      <Application Name="SSMS21" Type="Exe" Path="C:\Program Files\Microsoft SQL Server Management Studio 21\Common7\IDE\Ssms.exe" Method="Publisher" />
    2. Make sure that the paths specified in the PSMConfigureAppLocker.xml match the installation paths of SQL Server Management Studio.
    3. Save the PSMConfigureAppLocker.xml configuration file and close it.
    4. Open a PowerShell window, and use the following command to start the script:
CD “C:\Program Files (x86)\CyberArk\PSM\Hardening” PSMConfigureAppLocker.ps1
  1. Next, update the PSM-SQLServerMgmtStudio and PSMSQLServerMgmtStudio-Win connection components as follows:
    1. In the PVWA, click ADMINISTRATION to display the System Configuration page, then click Options; the main system configuration editor appears.
    2. Expand the Connection Components section, then expand the PSMSQLServerMgmtStudio connection component.
    3. For PSM-SQLServerMgmtStudio: In Target Settings, set the ClientApp parameter to the SQL Server Management Studio installation path on the PSM machine.
    4. For PSM-SQLServerMgmtStudio-Win: In Target Settings > Client Specific, set the ClientInstallationPath parameter value to the SQL Server Management Studio installation path on the PSM machine. 
  2. For PSM-SQLServerMgmtStudio and PSM-SQLServerMgmtStudio-Win: In Target Settings > Client Specific, make sure that the WaitBeforeCmdlineParmsHide parameter value is set to 20000.
  3. Expand Target Settings, then select Lock Application Window.
  4. For PSM-SQLServerMgmtStudio: Right-click the MainWindowClass parameter and in the pop-up menu, select Revert to Default. This clears the MainWindowClass setting. For PSM-SQLServerMgmtStudio-Win: Set the parameter Enable to No.

Known Issues:

  • This connection client only supports local database users, and does not support domain users for connecting to the database.
  • Double quotation signs (") in passwords are not supported. As SSMS.exe doesn't support the double quotation (") character as part of a password, the PVWA does not support it either. Add the double quotation (") character as a forbidden character in the CPM.
  • Open Object Explorer without specifying the database password. By default, when opening SQL Server Management Studio, two windows are created – Editor and Object Explorer. The Object Explorer window requires credentials.

Work Around: When the editor window is in focus, press ALT+Q+O; the Object Explorer window will be auto-authenticated.
 

After configuring the PSM-SQLServerMgmtStudio or PSMSQLServerMgmtStudio-Win, when trying to connect you might see an error message with the title "PSM Disconnect Failed", with further dialog: PSMSR133E [<unique identifier>] Failed to create process <Program Path>. Code: 2 

The cause of the problem is generally an invalid program path. For example, check to make sure that any program with \Program Files (x86) in the path has a space between the Files and (x86)

To fix this error correct the program path by going to Administration -> Options -> Connection Components and then Target Settings for the connection component.

 

Steps

ka3Vy000008GLrtIAG__eid=ka3Vy000008GLrt&feoid=00N2J000009R3kv&refid=0EMVy00000W1mBR.png

 

 

  1. On the PSM machine, install the Microsoft SQL Server Database Administration Tool. SQL Server Management Studio can be obtained from the Microsoft website. 
  2. The PSM AppLocker configuration is saved in the PSMConfigureAppLocker.xml configuration file and must be edited manually before you run the configuration script.
  3. Remove the read-only permissions from the PSMConfigureAppLocker.xml file.
  4. In the Hardening subfolder of the PSM installation folder, open the PSMConfigureAppLocker.xml configuration file and edit it as follows
  5. Configure the AppLocker to permit SQL Server Management Studio to run on the PSM server.

a. Modify the SQL Server Management Studio <version> processes section, please change the path of the ssms.exe accordingly as per the env:

SQL Server Management Studio Version

Add

2008

<Application Name="SSMS2008" Type="Exe" Path="C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe" Method="Publisher" />

2012

<Application Name="SSMS2012" Type="Exe" Path="C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\Ssms.exe" Method="Publisher" />

2016

<Application Name="SSMS2016" Type="Exe" Path="C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio\Ssms.exe" Method="Publisher" />

2017

<Application Name="SSMS2017" Type="Exe" Path="C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\Ssms.exe" Method="Publisher" />

2018

<Application Name="SSMS18" Type="Exe" Path="C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\Ssms.exe" Method="Publisher" />

2022

<Application Name="SSMS19" Type="Exe" Path="C:\Program Files\Microsoft SQL Server Management Studio 19\Common7\IDE\Ssms.exe" Method="Publisher" />

2025

<Application Name="SSMS21" Type="Exe" Path="C:\Program Files\Microsoft SQL Server Management Studio 21\Common7\IDE\Ssms.exe" Method="Publisher" />

 b. Make sure that the paths specified in the PSMConfigureAppLocker.xml match the installation paths of SQL Server Management Studio.

 c. Save the PSMConfigureAppLocker.xml configuration file and close it.

 d. Open a PowerShell window, and use the following command to start the script (run as administrator)

CD “C:\Program Files (x86)\CyberArk\PSM\Hardening”

.\PSMConfigureAppLocker.ps1

6. Next, update the PSM-SQLServerMgmtStudio and PSMSQLServerMgmtStudio-Win connection components as follows:

    1. In the PVWA, click Administration to display the System Configuration page, then click Options; the main system configuration editor appears.
    2. Expand the Connection Components section, then expand the PSMSQLServerMgmtStudio connection component.
    3. For PSM-SQLServerMgmtStudio: In Target Settings, set the ClientApp parameter to the SQL Server Management Studio installation path on the PSM machine.
    4. For PSM-SQLServerMgmtStudio-Win: In Target Settings > Client Specific, set the ClientInstallationPath parameter value to the SQL Server Management Studio installation path on the PSM machine. 

7. For PSM-SQLServerMgmtStudio and PSM-SQLServerMgmtStudio-Win: In Target Settings > Client Specific, make sure that the WaitBeforeCmdlineParmsHide parameter value is set to 20000.

8. Expand Target Settings, then select Lock Application Window.

9. For PSM-SQLServerMgmtStudio: Right-click the MainWindowClass parameter and in the pop-up menu, select Revert to Default. This clears the MainWindowClass setting. For PSM-SQLServerMgmtStudio-Win: Set the parameter Enable to No.

 

Known Issues:

 

  • This connection client only supports local database users, and does not support domain users for connecting to the database.
  • Double quotation signs (") in passwords are not supported. As SSMS.exe doesn't support the double quotation (") character as part of a password, the PVWA does not support it either. Add the double quotation (") character as a forbidden character in the CPM.
  • Open Object Explorer without specifying the database password. By default, when opening SQL Server Management Studio, two windows are created – Editor and Object Explorer. The Object Explorer window requires credentials.

 

Work Around: When the editor window is in focus, press ALT+Q+O; the Object Explorer window will be auto-authenticated.

 

After configuring the PSM-SQLServerMgmtStudio or PSMSQLServerMgmtStudio-Win, when trying to connect you might see an error message with the title "PSM Disconnect Failed", with further dialog:

PSMSR133E [<unique identifier>] Failed to create process <Program Path>. Code: 2 

 

The cause of the problem is generally an invalid program path. For example, check to make sure that any program with \Program Files (x86) in the path has a space between the Files and (x86)

 

To fix this error correct the program path by going to Administration -> Options -> Connection Components and then Target Settings for the connection component.

 

Rate this article: