Help Center
Choose product document...
Veeam Backup & Replication 9.5
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:

PS C:\PS> $host = Get-VBRServer -Type ESXi

 

// Get a datastore:

PS C:\PS> $datastore = Find-VBRViDatastore -Name "Datastore1" -Server $host

 

// Create the virtual lab:

PS C:\PS> 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:

PS C:\PS> 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:

PS C:\PS> $newvlab = Get-VBRServer -Name "ESXi01" | Find-VSBVirtualLab -Name "Virtual Lab 02"

 

// Connect the virtual lab:

PS C:\PS> 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 Backup Explorers User Guide

PowerShell Reference

RESTful API Reference

Veeam Backup FREE Edition User Guide

Veeam Backup for Microsoft Office 365

Veeam ONE Documentation

Veeam Endpoint Backup Documentation

Veeam Management Pack Documentation