Forum / Remote Desktop Manager - PowerShell Repository

Weekly Scripted Export/Backup

  • Create an Issue
  • Cancel

I am trying to work out the best way to export the data from Remote Desktop Manager on a automated bases, so we can store an encrypted version offsite of all our passwords.
I can export the data in password protected ZIP file or encrypted HTML within the gui, but I would like to automate it, and I would appreciate anyone that can offer some help on this?
We are currently using SQL server to store the data, and I can automate the backup of the SQL database but that is not encrypted and I would like the data in type that can be accessed without a server or any application like SQL server, so a ZIP or HTML file is perfect for this, any help or alternative advise is more than welcome.


Thanks
Martin

Clock4 yrs

Hello,

The script will be outside of RDM, and you must use some other tool to schedule its execution.

You must adapt the paths to your own environment!

$YourRDMModule = 'D:\Tools\Devolutions\LastRDM\RemoteDesktopManager.PowerShellModule.psd1'
$ExportFileName = 'D:\Bak\RdmData.xml'
If ( ! (Get-module RemoteDesktopManager.PowerShellModule )) {
Import-Module $YourRDMModule
}
#the next call is for display purposes, I would grab the output of the script in a log file
Get-RDMCurrentDatasource
#if you have multiple data sources, you must use something like
#Set-RDMCurrentDataSource -ID '{YOUR DATA SOURCE ID}' -Username $userName -Password $userPassword
$sessions = Get-RDMSession;
#now we enforce using a password to protect the exported file
#since this script would typically be scheduled, we are providing the password as is
#there are multiple ways to get a password from a profile without hard-coding it
#in a script.
$exportPwd = "123456"
$pass = ConvertTo-SecureString $exportPwd -asplaintext -force;
#Now on to the export, the only format that can be imported back in RDM is XML!
Export-RDMSession -Path $ExportFileName -Sessions $sessions -XML -Password $pass -IncludeCredentials

We intend to improve this, maybe even offer a function library that would contain an improved version of this.

Just let us know if there is an issue with this.


Best regards,



Maurice Côté

signaturesignature

Clock4 yrs