DVLS Module: How to correctly set data.Connection.Security on Entries?

Resolved Implemented

DVLS Module: How to correctly set data.Connection.Security on Entries?

avatar

Hi All

Whats the correct way to set the Permissions for specified Entries?

Thanks,
Andreas

All Comments (9)

avatar

Hello Andreas,

The permissions can be updated or set using the ConncetionPermission object you can apply using the Set-DSEntityPermissions cmdlet.

Here is a sample script that grants the View and View Password permission for group1 and group2 on a folder.

$vaultID = 'a9bd63e8-ebc4-488e-90bd-5d73f613821a'
$folderid = ((Get-DSFolders -VaultId $vaultID -IncludeSubFolders).body.data | Where-Object { $_.name -eq "FolderName" }).id

$folderPermissions = @(
    [ConnectionPermission]@{
        IsEmpty  = $false
        Override = [SecurityRoleOverride]::Custom
        Right    = [SecurityRoleRight]::View
        Roles    = @("group1","group2")
    },          
    [ConnectionPermission]@{
        IsEmpty  = $false
        Override = [SecurityRoleOverride]::Custom
        Right    = [SecurityRoleRight]::ViewPassword
        Roles    = @("group1","group2")
    }
)
Set-DSEntityPermissions -EntityId $folderid -Permissions $folderPermissions


Let us know if you have further questions about it.

Best regards,

Érica Poirier

avatar

Hi Erica

I tought that only works for Folders, but you're completely right, it works also for entries on my side 😉
Thanks a lot!

Best Regards,
Andreas

avatar

Hi Andreas,

You're more than welcome!

That's right, it woks on single entries too.

Best regards,

Érica Poirier

avatar

Hi Erica, I've tried to use the Set-DSEntityPermissions command to change permissions on a folder but I get a not recognized cmdlet error.
Is there a new way to accomplish that ?
I use version 2023.1.0.6 of Devolutions.Powershell.

avatar

Hello Boris,

Thank you for pointing out that this cmdlet is missing from the module.

The Set-DSEntityPermissions is not actually in the Devolutions.PowerShell module. We will soon release a new version of the module that will include the missing cmdlets.

We will let you know once it will be available.

Thank you for your patience.

Best regards,

Érica Poirier

avatar

Hi,

The latest release (2023.1.0.7) with Set-DSEntityPermissions is now available.

Regards

Jonathan Lafontaine

avatar
Hi,

The latest release (2023.1.0.7) with Set-DSEntityPermissions is now available.

Regards


Hey Jonathan

Im a little confused, because your Post is 13 Days old now and PSG still only has v2022.3.13.0.


Also on Git:




Where can i find 2023.1.0.7?

Best Regards,
Andreas

968d1c9f-7e0d-42f1-a2a2-fae01067e431.png

f606d3f4-b2cb-4a0e-b4f3-a9d1136564b5.png

1e7801f9-b1af-4d58-a71f-fea6ae2e3fff.png

avatar

Hello Andreas,

For your information, all PowerShell modules has been merged into one, the Devolutions.PowerShell module you can find on PSGallery.
https://www.powershellgallery.com/packages/Devolutions.PowerShell/

Here is the online documentation about it.
https://docs.devolutions.net/kb/remote-desktop-manager/knowledge-base/rdm-powershell-core-module/
https://docs.devolutions.net/kb/devolutions-server/how-to-articles/powershell-connectivity/

You'll have to uninstall all existing modules to be able to install it.

Let us know if you have further questions about this.

Best regards,

Érica Poirier

avatar

Thank you very much Erica, i totally missed that Part.

Best Regards,
Andreas