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 mailboxes of Exchange organization or only the selected ones. For creating a backup job that will process all mailboxes of Exchange organization the following settings will be enough:
- Exchange organization: choose the organization, added to Veeam Backup for Microsoft Office 365. The job will process the mailboxes of this organization. For more information on how to add an Exchange 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. Mailbox 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 Exchange 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"