Free XenServer VM’s Backup Tool and PowerShell Script!

Help me update and support the tool by donating with PayPal.

Download Version 2.0

Now also available on Chocolatey

Recently I wrote a blog about XenServer and Powershell commands this blog was also published on the Citrix Blog site here. With those commands in hand I wanted to create something that can be used by everyone who uses Citrix XenServer. To mind came a PowerShell VM Backup Script (invoke-XenBackup) and a PowerShell Forms GUI tool to also schedule your Backup of XenServer VM’s. The tool has the following functions:

  • Create a backup folder with date.
  • Take a snapshot of a running or stopped VM.
  • Export the snapshot to a XVA file.
  • Optionally Zip the backup folder.
  • Optionally Email backup log.
  • Shedule a backup as a Windows Scheduled Task.
  • Run and delete scheduled backup tasks.
  • Saves your XenServer Password in a Encrypted Vault.

Changelog V2.0:

  • Now support for network drives, enter a path like \\DOMAIN\Share at Enter backup path and the tool will mount the drive. The task user does need to have write permissions on the share.
  • Temp issue fixed, the tmp file created by the export will now be written to the backup destination instead of C drive.
  • GUI hangs on run now backup is fixed, run now backups will now be set as a windows task that runs directly. You can manage your RUN NOW tasks in the scheduled tasks window.
  • Performance improvements.

Download Version 2.0

System requirement’s:

Video tutorial

Powershell Script

The heart of the tool is a PowerShell script I created named invoke-XenBackup. The script does require the XenServer PowerShell module installed. The GUI Tool will do this automatically. To do this manually download the PowerShell module here under the development section. And extract it to your PowerShell Module folder.

Example how to use the script:

Invoke-XenBackup -ExportPath “C:\Backup” -VMnames “VM01″,”VM02″,”VM03” -username “root” -password “P@ssw0rd” -XenHost “XenHost01” -LogPath “C:\Temp” -Email -SMTPServer “” -FromEmail “” -ToEmail “” -ZIP

This will backup VM01, VM02 and VM03 from XenHost01 in C:\Backup. Username and Password are for XenHost01. After the backup the folder will be ZIP’d and the backup logfile will be send in a email to

There is now also a multi-threaded version of the script thanks to Bill Rogge. The script uses 6 threads by default but you change that under  thread count.

I hope this was informative. For questions or comments you can always give a reaction in the comment section or contact me: