How to Create automatic backup of Remote Application Server settings

4 users found this article helpful

Powershell Module is available in Parallels Remote Application Server 15.5.2 (16138) and above.

For Parallels RAS v18 and above

Create .ps1 in the file in the same folder with following commands:

$SecretPassword = ConvertTo-SecureString "YourRASPassword" -AsPlainText -Force
$Username = 'Administrator'
$Date = Get-Date -Format dd.MM.yyyy
Import-Module RASAdmin
New-RASSession -Username $Username -Password $SecretPassword
Invoke-RASExportSettings "%BackupfilesFolder%\$Date.dat2"

Note: This file will create a separate .dat2 file with current date as a file name.

To overwrite Backup files use the command below:

$SecretPassword = ConvertTo-SecureString "YourRASPassword" -AsPlainText -Force
$Username = 'Administrator'
Import-Module RASAdmin
New-RASSession -Username $Username -Password $SecretPassword
Invoke-RASExportSettings "%BackupfilesFolder%\Backup.dat2"

Open Windows Scheduler and create a New Task

alttext

Fill all fields in General Tab

alttext

Open Actions Tab > Click New

alttext

Add your .ps1 script file

alttext

Open Triggers Tab

Click New

alttext

Select schedule settings

alttext

Click OK

Examples for previous versions

Write backup files on specific dates:

$SecretPassword = ConvertTo-SecureString "YourRASPassword" -AsPlainText -Force
$Username = 'Administrator'
$Date = Get-Date -Format dd.MM.yyyy
Import-Module 'C:\Program Files (x86)\Parallels\ApplicationServer\Modules\PSAdmin\PSAdmin.dll'
New-RASSession -Username $Username -Password $SecretPassword
Invoke-ExportSettings "%BackupfilesFolder%\$Date.dat2"

Overwrite Backup file:

$SecretPassword = ConvertTo-SecureString "YourRASPassword" -AsPlainText -Force
$Username = 'Administrator'
Import-Module 'C:\Program Files (x86)\Parallels\ApplicationServer\Modules\PSAdmin\PSAdmin.dll'
New-RASSession -Username $Username -Password $SecretPassword
Invoke-ExportSettings "%BackupfilesFolder%\Backup.dat2"

Was this article helpful?

Tell us how we can improve it.