Free XenServer VM’s Backup Tool and PowerShell Script!

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.

Download the Workspace-Guru XenServer Backup Tool.

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

Download the script as a RES / Ivanti Automation Building Block from the RES HUB.

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


Leave a Reply

Your email address will not be published. Required fields are marked *