Help Center
Choose product document...
Veeam Backup & Replication 9.5 Update 4
PowerShell Reference

Working with VMware Virtual Lab

This example shows how to create a virtual lab and perform other actions on virtual labs from your command line.

Create a virtual lab

To add a virtual lab, you will need to perform the following steps:

  1. Get the VMware host on which you want to create the virtual lab with Get-VBRServer and save it to a variable.
  2. Get the datastore that will be used for storing the redo logs running Find-VBRViDatastore and save it to a variable.
  3. Run Add-VSBVirtualLab with these variables to create the virtual lab.

// Get the host:

$host = Get-VBRServer -Type ESXi


// Get a datastore:

$datastore = Find-VBRViDatastore -Name "Datastore1" -Server $host


// Create the virtual lab:

Add-VSBVirtualLab -Name "Microsoft Exchange Vlab" -Server $host -Datastore $datastore

Remove the virtual lab

If you no longer need a virtual lab, you can remove it.

To remove a virtual lab, you will need to perform the following steps:

  1. Get the virtual lab that you want to remove with Get-VSBVirtualLab.
  2. Run Remove-VSBVirtualLab to remove it.

// Get the virtual lab and pipe it down:

Get-VSBVirtualLab -Name "Microsoft Exchange Vlab" | Remove-VSBVirtualLab

Connect an existing virtual lab

If you have virtual labs that are not added to your Veeam backup console, you can look for them and connect them.

You will need to perform the following steps:

  1. Run Find-VSBVirtualLab to look for the virtual lab. You will need to get the host where it is located first.
  2. Add them with Connect-VSBVirtualLab.

Note that the Find-VSBVirtualLab cmdlet can be used only to look for the virtual labs that are not connected to the Veeam backup server. You can use the objects that you obtain with it only with the Connect-VSBVirtualLab cmdlet. For all other purposes, run Get-VSBVirtualLab.

// Find the virtual lab:

$newvlab = Get-VBRServer -Name "ESXi01" | Find-VSBVirtualLab -Name "Virtual Lab 02"


// Connect the virtual lab:

Connect-VSBVirtualLab -VirtualLab $newvlab

Veeam Large Logo

User Guide for VMware vSphere

User Guide for Microsoft Hyper-V

Enterprise Manager User Guide

Veeam Cloud Connect Guide

Veeam Agent Management Guide

Veeam Explorers User Guide

Backup and Restore of SQL Server Databases

Veeam Plug-ins for Enterprise Applications

PowerShell Reference

Veeam Explorers PowerShell Reference

RESTful API Reference

Required Permissions Reference

Veeam Availability for Nutanix AHV Documentation

Veeam Backup for Microsoft Office 365 Documentation

Veeam ONE Documentation

Veeam Agent for Windows Documentation

Veeam Agent for Linux Documentation

Veeam Management Pack Documentation