Forum / Remote Desktop Manager - PowerShell Repository

Create Private Vault Credential Entries from Powershell Script

  • Create an Issue
  • Cancel

I am currently working on making a Win10Enterprise image for our laptops, and as part of that, setting up RDM. For all our existing users, they already have their Private Vault credentials setup and will not need to do this again.

However, for new users, I need a simple way to create all the required Private Vault credentials we use. Ideally, this would be in the form of some script in RDM that gets run for each new user as part of onboarding.

I can see that there is the New-RDMSession powershell command, but I am unsure if it is able to create entries in the Private Vault?

Alternatively, is there a way to make "User Templates" that can be used for creating new users that will already have these Private Vault credentials created?

Clock2 mths

Hello,

It is possible to save an entry in the user's private vault using the Set-RDMPrivateSession PowerShell cmdlet instead of using Set-RDMSession. Be sure that when using the New-RDMSession, you will not use the -SetSession switch to save it in the shared vault.

About the user templates, it is not possible to create entries in the Private Vault on user account creation using a template. You need to do it using a script.

Finally, I will move this thread in the PowerShell section.

Best regards,



Érica Poirier

OFFICE CLOSURE!
Although our various support queues will be monitored for emergencies, Devolutions' offices will be closed on June 24 and July 1st, 2019.

signaturesignature

Clock2 mths

Thanks, Erica!

I missed that one when going through all the commands... Your help is greatly appreciated!

Clock2 mths

How can I set a password to the new credential ?

Clock12 days


Hello,

You can use the Set-RDMSessionPassword cmdlet to set a password on a credential entry. The entry must already exist in the vault before being able to set the password.

Best regards,



Érica Poirier

OFFICE CLOSURE!
Although our various support queues will be monitored for emergencies, Devolutions' offices will be closed on June 24 and July 1st, 2019.

signaturesignature

Clock12 days


When I use the Set-RDMSessionPassword, the credential is created in the public vault and not in my pivate vault.

This is my script :
$session = New-RDMSession -Name "Test" -Type Credential

$session.HostUserName = "username"
$session.HostDomain ='$MACHINE_DOMAIN$'
Set-RDMPrivateSession $session -refresh

Set-RDMSessionPassword -ID $session.id -Password (Read-Host -AsSecureString "Password")

Clock12 days