Understanding Veeam Backup for Microsoft 365 Cmdlets

A cmdlet is a specialized .NET class that interacts with Microsoft .NET Framework objects. Each cmdlet acts as a single-function command that can perform multiple operations with these objects. Objects represent instances of the Veeam Backup for Microsoft 365 backup infrastructure: backup proxies, backup repositories and object storage, backup and backup copy jobs, restore sessions and so on.

Each cmdlet has parameters that pass additional object data to cmdlet. Parameters can be either required or optional. You will not be able to run a cmdlet without specifying the required parameters, while the optional parameters can be omitted. Parameters are organized into parameter sets that form a syntax of the cmdlet.

Cmdlets and their parameters are named after the Windows PowerShell naming conventions. Veeam cmdlets are developed to behave like other Microsoft Windows cmdlets.

This guide covers only basic information on how to work with Veeam Backup for Microsoft 365 cmdlets using Windows PowerShell. To learn more about Windows PowerShell, see this Microsoft article.

Input and Output

As an input, the cmdlets expect objects, and they output objects. The objects represent instances of the Veeam Backup for Microsoft 365 backup infrastructure and 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 whole sets of parameters available in the cmdlet and what each parameter expects as input. For example, Add-VBOJob has the following syntax:

Add-VBOJob -Organization <VBOOrganization> -Name <String> -Repository <VBORepository> -SelectedItems <VBOBackupItem[]> [-ExcludedItems <VBOBackupItem[]>] [-Description <String>] [-SchedulePolicy <VBOJobSchedulePolicy>] [-RunJob <SwitchParameter>] [-SelectedOneDriveFolders <String[]>] [-ExcludedOneDriveFolders <String[]>] [<CommonParameters>]

Add-VBOJob -Organization <VBOOrganization> -Name <String> -Repository <VBORepository> -EntireOrganization <SwitchParameter> [-ExcludedItems <VBOBackupItem[]>] [-Description <String>] [-SchedulePolicy <VBOJobSchedulePolicy>] [-RunJob <SwitchParameter>] [-SelectedOneDriveFolders <String[]>] [-ExcludedOneDriveFolders <String[]>] [<CommonParameters>]

That means:

  • To create a backup job, you need to specify an organization whose items will be processed, the repository where backups will be stored, specify name, description and schedule for this backup job.
  • The cmdlet has two parameter sets per different job settings: you can instruct a backup job to process all items or only the selected ones. Use an appropriate parameter set for each case.