How to Programmatically Set Linked Vault Credential

How to Programmatically Set Linked Vault Credential

avatar

I'm attempting to use PowerShell to create a new RDP session & assign a specific credential object to the Linked (Vault) connection type. The Credentiqal object already exists, and I can select the credential from the drop-down manually, but no matter what I try I can't set the credential via PowerShell.

I'm successfully able to set the Credential type to Linked (Vault) using the GUID c6ed87bb-5293-4c01-a6a8-f486852aa8a8.
I'm attempting to set the CredentialConnectionSavedPath property on the RDP session to set the Credential object - is this correct one?

FYI I'm using the 2023.2.0.7 version of the module, and Free 2023.1.20.0 version of the RDM software, in a SQLite data source

All Comments (2)

avatar

I may have stumbled upon a working way to accomplish this. It seems if I set the CredentialConnectionID to the ID of the credential object I want to apply, this successfully links the credential to the RDP session

avatar

Hello,

That is the correct way to assign the linked vault credential, I am glad you found it!

If you would like to view some PowerShell samples, for example for permissions, import, etc., please head over to https://github.com/Devolutions/RDMSamples-ps/tree/main/module

Best regards,

Richard Boisvert