Add Role to a vault

avatar
gerd
Disabled


I'd like to add a role to a vault with the activated property "has access".

Is it possible with powershell ?



(I create sucessul around 500 vaults using powershell, thats way i don't won't set roles manually)


assign Role to vault.jpg

All Comments (9)

avatar

Hello,

Unfortunately, it's not supported for now. It is on our todo list to implement this functionality (as well as accessing the root folder for the similar purposes).
Our Engineering Ticket is RDMW-3575.

I linked this forum to the ticket, so we'll be able to notify you here when available.


Best regards,

Alex Belisle

avatar


Hello Alexandre,

thank you for fast reply. Its a pitty that we can't do this at the moment.

And is it possible to set the permissions in the vault by powershell (lets assume the role was added manually).

Over the grant window or other options in the permission screen.



EditPermissions.jpg

avatar

Hello,

I just looked again for this one, and yes you can access the permissions and all other settings of the Root Folder (Vault settings interface) with
Get-RDMRootSession.
This will give you the Root object, on which you can perform all the same actions than regular entries.

I hope this helps!


Best regards,

Alex Belisle

avatar


Thank you, seams to be an undocumented command, i could not find it in online help.


But the major problem keeps, that I cant assign a role to a vault. I tryed other ways but failed
- to copy a master vault with all roles already assignd -> seems to be not possible to copy vaults
- to export / import a master vault -> possible, but export informations seams not to include roles

Do you have any other idea how i could give user rights on vaults with powershell ?

avatar

Hello,

Yes you're right, it's a very new feature, introduced in 2019.2.18 (https://remotedesktopmanager.com/release-notes)

I'm afraid that for now this cannot be done by Powershell. We will have to wait for the new CmdLet when available...

Sorry I can't be of more help for now.


Best regards,

Alex Belisle

avatar

Would there be better possibilities doing this with using the "Devolutions Password Server" ?

avatar

Hello,

Unfortunately (again) Powershell only apply to RDM, no matter the data source. DPS on its own has a CLI (restAPi), but it doesn't allow permissions manipulations, its use is mainly getting passwords from other systems (Application To Application Passwords...


Best regards,

Alex Belisle

avatar

According to the Releaselog https://devolutions.net/remote-desktop-manager/release-notes?utm_source=rdm&utm_medium=native&utm_campaign=help

**************************
Added cmdlets
(Add-RDMRoleRepositoryAccess/Remove-RDMRoleRepositoryAccess/Add-RDMUserRepositoryAccess/Remove-RDMUserRepositoryAccess)
to grant/deny access roles/users to vaults
**************************

this should be possible now ?

avatar

Hello,

You are right that this is now possible since RDM 2020.1.10. It is important to save the role information with the Set-RDMRole cmdlet or the user information with the Set-RDMUser cmdlet as the vault access is saved in those objects.

Here is a sample script.

$role = Get-RDMRole -Name MgmtRole
$vault = Get-RDMRepository -Name Customer
Add-RDMRoleRepositoryAccess -Repository $vault -Role $role
Set-RDMRole $role


Best regards,

Érica Poirier