This is an archive version of the document. To get the most up-to-date information, see the current version.

Understanding Veeam Cmdlets

In this article

    The Veeam cmdlets are developed to behave like other Microsoft Windows cmdlets. Each cmdlet is a simple single-function command that is a specialized .NET class implementing specific actions. Most of the cmdlets have parameters that pass additional data to the command. The cmdlets and their parameters are named after the Microsoft naming conditions.

    Working with Veeam PowerShell cmdlets and scripts in many respects depends on your imagination, skills and expertise in Windows PowerShell 2.0. To learn more about Windows PowerShell 2.0 and its basics, use the book by Dr. Tobias Weltner: Microsoft Master-PowerShell.

    Understanding Veeam Cmdlets Note:

    Veeam Support team does not write PowerShell scripts on demand.

    Platform

    Some Veeam cmdlets differ for VMware and Hyper platforms. A prefix indicates the platform: 'Vi' stands for VMware, and 'Hv' stands for Hyper-V. A Vi-cmdlet will not work for Hyper-V instances, and vice versa. For example, Add-VBRViBackupJob creates a backup job for VMware VMs, but if you need to back up Hyper-V VMs, you need Add-VBRHvBackupJob. Some cmdlet work for both platforms, like Get-VBRJob. You can additionally check the platform in the Applies to section on the online help page for each cmdlet.

    Input and Output

    As an input, the cmdlets expect objects, and they output objects. The objects mostly represent instances of the backup infrastructure: VMs, jobs, job settings, failover plans and so on. See Veeam PowerShell Objects for objects properties. The objects can be part of a pipeline.

    You can use the cmdlet help to understand what kind of input is needed. The cmdlets have syntax that shows the whole set of parameters available in the cmdlet and what each parameter expects as input. For example, Add-VBRHvProxy has the following syntax:

    Add-VBRHvProxy -Server <CHost> [-Description <String>] [-MaxTasks <Int32>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

    That means that to add a new Hyper-V proxy, you need to indicate a server that will act as the proxy, the description of the new proxy and a number of tasks that the proxy can perform simultaneously.

    Some cmdlets have two or more parameter sets. For example, restore cmdlets offer a 'simplified' parameter set for restoring to original location, while the parameter set for restoring to another location allows to indicate the target server and other detail and these parameters are mandatory for this set.

    Understanding Veeam Cmdlets Note:

    Since Veeam Backup & Replication v5 uses Windows PowerShell 2.0, scripts that you have created with previous versions of Veeam Backup & Replication which used Windows PowerShell 1.0 may not work.