In this example, we will review how to create a backup job by means of Veeam Backup for Microsoft Office 365 PowerShell command. To let you get most out of this example, each command will be illustrated by the action from the Veeam Backup for Microsoft Office 365 UI that provides the result similar to execution of the PowerShell command.
To create a backup job, you will need the Add-VBOJob cmdlet. The cmdlet has two parameter sets: for processing all items of an organization or only the selected ones. For creating a backup job that will process all items of an organization the following settings will be enough:
- Organization: choose the organization, added to Veeam Backup for Microsoft Office 365. The job will process the items of this organization. For more information on how to add an organization to Veeam Backup for Microsoft Office 365, refer to the Add-VBOOrganization cmdlet.
- Backup repository: choose the backup repository, added to Veeam Backup for Microsoft Office 365. Backups will be stored in this repository. For more information on how to add a repository to Veeam Backup for Microsoft Office 365, refer to the Add-VBORepository cmdlet.
- Backup job name: specify the name of the backup job you want to create.
We will get VBOOrganization and VBORepository objects and save them to variables:
- We will use the Get-VBOOrganization cmdlet to get the organization and save the result to the $org variable:
PS C:\PS> $org = Get-VBOOrganization -Name "ABC Company"
- We will use the Get-VBORepository cmdlet to get backup repository and save the result to the $repository variable:
PS C:\PS> $repository = Get-VBORepository -Name "ABC E-Mail Backup"
- Finally, we can create a backup job with the "ABC Backup Job" name. We will need the saved $org and $repository variables:
PS C:\PS> Add-VBOJob –Organization $org –Repository $repository –Name "ABC Backup Job"