Users

All Posts (8)

avatar

Nathan Lachance

Backup Script including attachments as .rdm file

avatar
avatar
avatar

Hi dan2,

Thanks for the suggestion! You can already do this with our PowerShell module and an application identity. This script saves each vault, including its credentials and attachments, to its own encrypted .rdm file:

New-RDMWorkspace -Cloud -Name 'CloudBackup' -Server 'https://yourcompany.devolutions.app' -Username '<application name>' -ScriptingTenantID '<application key>' -ScriptingApplicationPassword '<application secret>' | Set-RDMCurrentWorkspace
$password = Read-Host -AsSecureString 'Backup password'
foreach ($vault in Get-RDMVault) {
    Set-RDMCurrentVault -ID $vault.ID
    Get-RDMEntry | Export-RDMEntry -RDM -Path "D:\Backups\$($vault.Name).rdm" -Password $password -IncludeCredentials -IncludeAttachements
}

A few things to know:

  • These are Remote Desktop Manager commands, and their integration with Devolutions Cloud is still a work in progress. We recommend checking a backup once by importing it into Remote Desktop Manager.

  • The application identity can only back up the vaults it can access. Give it access to each vault you want, with permission to export, edit entries and view passwords.

  • Keep the backup password somewhere safe, since the files can't be opened without it.

This solution only covers shared vaults. User vaults aren't included. Do you need the user vaults in the backup too, or are the shared vaults enough?

Let us know if this solution works for you, and don't hesitate to reach out if you need more help!

Powershell New-HubEntry - How to use it?

avatar
avatar
avatar

Hi mytmpmaza

We've got documentation about PowerShell module with some examples with commands here. But before I answer your questions. PSDecryptedEntry(Wrapper for connection) is a complex object. So we don't have, for now, documentation/examples for all possible cases/types to create/edit an entry. So in my previous post, I gave you an example of how to create a folder, a credential, and also how to "add it under" a new folder. That been said:

  1. To add a new credential or entry to an existing folder, you just need to get its Id first, and after you can set it in the New-HubEntry flow ("ParentId" property).

    1. Example of where to set the folder id of your existing folder (Search for REPLACE_THIS_WITH_FOLDER_ID_HERE): $newCredential = [Devolutions.Hub.PowerShell.Entities.Hub.PSDecryptedEntry]@{ PsMetadata = [Devolutions.Hub.PowerShell.Entities.Hub.PSMetadata]@{ Name = "Credential"; ParentId = REPLACE_THIS_WITH_FOLDER_ID_HERE; ConnectionType = [Devolutions.Generated.Enums.ConnectionType]::Credential }; Connection = [Devolutions.Generated.Models.Connection]@{ Credentials = [Devolutions.Generated.Models.CredentialsConnection]@{ CredentialType = [Devolutions.Generated.Enums.CredentialResolverConnectionType]::Default; Password = "Password" } } }

  2. Like I said above, the entry object is complex and each type is not handled the same way. So the password can be set in different places depending on the type. For your particular case, the password is set under "Connection.Credentials.Password".

    1. Example to retrieve password of a credential entry:

      1. $credential = Get-HubEntry -VaultId 9ac943e3-0e81-4257-8ff1-bac4490fdb37 -EntryId303edc75-6bf5-451f-af80-4ec8e6893edd

      2. $credential.Connection.Credentials.Password

  3. In my previous post example, if the values are not changed, it's normal it will do the same. Also, it's not an error if the folder has a duplicated name.

I hope my examples and explanation are clear and will help you. If not or you have more questions, don't hesitate.

Devolutions Cloud backup/restore and export features

avatar
avatar
avatar
avatar
avatar

Hi superarash,

Thanks for your patience. The fix is finally released with this new version 2021.12.13. Don't hesitate if you have any other questions.

Have a good day!

Powershell New-HubEntry - How to use it?

avatar
avatar
avatar

Hi mytmpmaza,

Thanks again for your patience. The fix is finally released with this new version 2021.12.13.

To answer your question, the object for this purpose is the same for a folder and an entry: PSDecryptedEntry. The difference between them is the type you'll set in it. So in your case, you'll need to create 2 PSDecryptedEntry(1 of type folder and the other of type credential) and add them to your vault.

So below, here's an example on how to create/add a folder and create/add a credential in your newly created folder:

- Connect to your Hub with the PowerShell module

- Add a folder

- Set a variable with the "folder object". Ex:

$newFolder = [Devolutions.Hub.PowerShell.Entities.Hub.PSDecryptedEntry]@{ PsMetadata = [Devolutions.Hub.PowerShell.Entities.Hub.PSMetadata]@{ Name = "Folder"; ConnectionType = [Devolutions.Generated.Enums.ConnectionType]::Group }; Connection = [Devolutions.Generated.Models.Connection]@{ } }

- Add your folder to your vault. Ex:

$folderAdded = New-HubEntry -VaultId 9ac943e3-0e81-4257-8ff1-bac4490fdb37 -PSDecryptedEntry $newFolder

- Add a credential in your folder

- Set a variable with a "credential object" and use the newly added folder Id in "ParentId". Ex:

$newCredential = [Devolutions.Hub.PowerShell.Entities.Hub.PSDecryptedEntry]@{ PsMetadata = [Devolutions.Hub.PowerShell.Entities.Hub.PSMetadata]@{ Name = "Credential"; ParentId = $folderAdded.Connection.ID; ConnectionType = [Devolutions.Generated.Enums.ConnectionType]::Credential }; Connection = [Devolutions.Generated.Models.Connection]@{ Credentials = [Devolutions.Generated.Models.CredentialsConnection]@{ CredentialType = [Devolutions.Generated.Enums.CredentialResolverConnectionType]::Default; Password = "Password" } } }

- Finally, add your credential to your vault. Ex:

New-HubEntry -VaultId 9ac943e3-0e81-4257-8ff1-bac4490fdb37 -PSDecryptedEntry $newCredential

Hope this will help you. Don't hesitate if you have any other questions.

Have a good day and a happy new year!

Devolutions Cloud backup/restore and export features

avatar
avatar
avatar
avatar
avatar

Hi superarash,

We are actually working on some bugs in PowerShell about this new feature. I'll keep you updated when the fix will be released.

Thank you for your comprehension.

Powershell New-HubEntry - How to use it?

avatar
avatar
avatar

Hi mytmpmaza,

Thanks for your patience. We are actually working on some bugs with this command. I'll keep you updated when the fix will be released.

Thank you for your comprehension.

Powershell New-HubEntry - How to use it?

avatar
avatar
avatar

Hi mytmpmaza

I'll check for some documentation/tips to help you use the command "New-HubEntry" in the best way possible.

Have a good day!

ConvertTo-HubFlatObject missing from Devolutions.Hub PowerShell Module

avatar
avatar
avatar

Hi, superarash.

We just released a new version of Devolutions Password Hub PowerShell Module (2021.11.2) which fixes this issue.

Thank you for your feedback and have a good day.

1 - 8 of 8 items