Add-VBOOrganization

Short Description

Adds Microsoft organizations to the Veeam Backup for Microsoft 365 infrastructure.

Syntax

Add-VBOOrganization [-Name <string>] [-Office365ExchangeConnectionsSettings <VBOOffice365ConnectionSettings>] [-Office365SharePointConnectionsSettings <VBOOffice365ConnectionSettings>] [-OnPremExchangeConnectionSettings <VBOExchangeOnPremConnectionSettings>] [-OnPremSharePointConnectionSettings <VBOSharePointOnPremConnectionSettings>] [-Region <VBOOffice365Region>] [-VeeamAADApplicationUsed <switchparameter>] [-EnableOffice365Teams <switchparameter>] [-EnableTeamsChats <switchparameter>] [<CommonParameters>]

Obsolete Cmdlet Set

The following cmdlet set is obsolete. It still works in Veeam Backup for Microsoft 365 version 6.0 but may not be supported in the next versions of Veeam Backup for Microsoft 365.

Add-VBOOrganization -Type <VBOOrganizationType> {OnPremises | Office365 | Hybrid} [-Name <string>] [<CommonParameters>]

Detailed Description

This cmdlet adds Microsoft organizations to the Veeam Backup for Microsoft 365 infrastructure. You can add the following types of Microsoft organizations:

  • Microsoft 365 organizations to back up Microsoft Exchange Online and Microsoft SharePoint Online with Microsoft OneDrive for Business.
  • On-premises Microsoft organizations to back up a Microsoft Exchange server and a Microsoft SharePoint server.
  • Hybrid organizations to back up both Microsoft 365 organizations and On-premises Microsoft organizations.

For more information on Hybrid types of organizations, see the Hybrid Organizations section of the Veeam Backup for Microsoft 365 User Guide.

When you add Microsoft organizations to the Veeam Backup for Microsoft 365 infrastructure, you can specify one of the following authentication methods that the cmdlet will use to connect to a Microsoft server:

Add-VBOOrganization Important

If you want to add Microsoft 365 organizations that will include both Microsoft Exchange Online and Microsoft SharePoint Online with Microsoft OneDrive for Business services, you must set the VBOOffice365ConnectionSettings object, that contains authentication settings to connect to Microsoft 365 organizations, to the same type of authentication mode.

Run the New-VBOOffice365ConnectionSettings cmdlet to create the VBOOffice365ConnectionSettings object.

Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

Name

Specifies a name of a Microsoft organization. The cmdlet will add an organization with this name.

String

False

Named

False

False

Office365ExchangeConnectionsSettings

Specifies connection settings. The cmdlet will use these settings to add Microsoft Exchange Online to Veeam Backup for Microsoft 365.

Note: If you also want to add Microsoft SharePoint Online to the same Microsoft 365 organization, you must set the VBOOffice365ConnectionSettings object to the same type of authentication mode.

Accepts the VBOOffice365ConnectionSettings object.

To create this object, run the New-VBOOffice365ConnectionSettings cmdlet.

False

Named

False

False

Office365SharePointConnectionsSettings

Specifies connection settings. The cmdlet will use these settings to add Microsoft SharePoint Online and Microsoft OneDrive for Business to Veeam Backup for Microsoft 365.

Note: If you also want to run the script with the Office365ExchangeConnectionsSettings parameter, you must set the VBOOffice365ConnectionSettings object to the same type of authentication mode.

Accepts the VBOOffice365ConnectionSettings object.

To create this object, run the New-VBOOffice365ConnectionSettings cmdlet.

False

Named

False

False

OnPremExchangeConnectionSettings

Specifies connection settings. The cmdlet will use these settings to add Microsoft on-premises Exchange organization to Veeam Backup for Microsoft 365.

Accepts the VBOExchangeOnPremConnectionSettings object.

To create this object, run the New-VBOOnPremConnectionSettings cmdlet.

False

Named

False

False

OnPremSharePointConnectionSettings

Specifies connection settings. The cmdlet will use these settings to add Microsoft on-premises SharePoint organization to Veeam Backup for Microsoft 365.

Accepts the VBOSharePointOnPremConnectionSettings object.

To create this object, run the New-VBOOnPremConnectionSettings cmdlet.

False

Named

False

False

Region

Specifies Microsoft Azure region where Microsoft 365 organization datacenter is located:

  • China
  • Germany
  • USDefence
  • USGovernment
  • Worldwide

Default: Worldwide

VBOOffice365Region

False

Named

False

False

VeeamAADApplicationUsed

Defines that the cmdlet will use the Veeam application to connect to Microsoft Graph.

Note: You must set this parameter to True for the following Microsoft Azure Regions:

  • China
  • Germany

Default: False

SwitchParameter

False

Named

False

False

EnableOffice365Teams

Defines that the cmdlet will add Microsoft Teams to Veeam Backup for Microsoft 365. To do this, the cmdlet will use settings specified with the Office365SharePointConnectionsSettings parameter.

Default: True

Note: If you want to use this parameter, you must also provide the Office365ExchangeConnectionsSettings and Office365SharePointConnectionsSettings parameters.

SwitchParameter

False

Named

False

False

EnableTeamsChats

For Microsoft organizations with modern app-only authentication.

Defines that the cmdlet will enable backup of team chats using Protected APIs in Microsoft Teams.

Default: False

Note: This parameter is available starting from Veeam Backup for Microsoft 365 version 6a (build 6.1.0.222).

SwitchParameter

False

Named

False

False

Type

Note: This parameter is obsolete.

Specifies the type of the organization deployment:

  • Office365
  • On-premises
  • Hybrid

VBOOrganizationType

True

Named

False

False

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About CommonParameters section of Microsoft Docs.

Output Object

The cmdlet returns the VBOOrganization object that contains settings of Microsoft organizations to the Veeam Backup for Microsoft 365 infrastructure.

Examples for Modern App-Only Authentication

These examples provide instructions on adding Microsoft organizations to the Veeam Backup for Microsoft 365 infrastructure using the modern app-only authentication method.

Add-VBOOrganizationExample 1. Adding Microsoft Organization to Back Up Several Microsoft Services

This example shows how to add a Microsoft organization to the Veeam Backup for Microsoft 365 infrastructure to back up the following services:

  • Microsoft Exchange Online.
  • Microsoft SharePoint Online and Microsoft OneDrive for Business.
  • Microsoft Teams and team chats using Protected APIs in Microsoft Teams.

$securepassword = Read-Host "Enter your password" -AsSecureString

Enter your password: **********

$appSettings = New-VBOOffice365ApplicationOnlyConnectionSettings -ApplicationCertificatePath "C:\certificate\cert.pfx" -ApplicationCertificatePassword $securepassword -ApplicationId 6c957a12-93fd-469a-86f6-1dc3cc81cf07 -ConfigureApplication

Add-VBOOrganization -Office365ExchangeConnectionsSettings $appSettings -Office365SharePointConnectionsSettings $appSettings -EnableTeamsChats

WARNING: To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code CHYX3QM33 to authenticate.

Perform the following steps:

  1. Run the Read-Host cmdlet. Specify the message that the console will display as a prompt. Provide the AsSecureString parameter. Save the result to the $securepassword variable.
  2. Enter the password.
  3. Run the New-VBOOffice365ApplicationOnlyConnectionSettings cmdlet. Specify the ApplicationCertificatePath, ApplicationCertificatePassword, ApplicationId and ConfigureApplication parameters. Save the result to the $appSettings variable.
  4. Run the Add-VBOOrganization cmdlet. Set the $appSettings variable as the Office365ExchangeConnectionsSettings parameter value. Set the $appSettings variable as the Office365SharePointConnectionsSettings parameter value. Provide the EnableTeamsChats parameter.
  5. Open the https://microsoft.com/devicelogin webpage in a browser and provide the authentication code that you get in the warning output.

Add-VBOOrganizationExample 2. Adding Microsoft Organization Together with Defining Azure AD Application Using Certificate

This example shows how to add a Microsoft organization to the Veeam Backup for Microsoft 365 infrastructure and define settings of an Azure AD application using the certificate.

$securepassword = Read-Host "Enter your password" -AsSecureString

Enter your password: **********

$newapp = New-VBOOffice365ApplicationOnlyConnectionSettings -ApplicationCertificatePath "C:\certificate\cert.pfx" -ApplicationCertificatePassword $securepassword -NewApplicationName "Application05"

Add-VBOOrganization -Office365ExchangeConnectionsSettings $newapp -Office365SharePointConnectionsSettings $newapp

WARNING: To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code CHYX3QM33 to authenticate.

Perform the following steps:

  1. Run the Read-Host cmdlet. Specify the message that the console will display as a prompt. Provide the AsSecureString parameter. Save the result to the $securepassword variable.
  2. Enter the password.
  3. Run the New-VBOOffice365ApplicationOnlyConnectionSettings cmdlet. Specify the ApplicationCertificatePath, ApplicationCertificatePassword and NewApplicationName parameters. Save the result to the $newapp variable.
  4. Run the Add-VBOOrganization cmdlet. Set the $newapp variable as the Office365ExchangeConnectionsSettings parameter value. Set the $newapp variable as the Office365SharePointConnectionsSettings parameter value.
  5. Open the https://microsoft.com/devicelogin webpage in a browser and provide the authentication code that you get in the warning output.

Add-VBOOrganizationExample 3. Adding Microsoft Organization to Back Up SharePoint Online

This example shows how to add a Microsoft organization to the Veeam Backup for Microsoft 365 infrastructure.

$securepassword = Read-Host "Enter your password" -AsSecureString

Enter your password: **********

$appSettings = New-VBOOffice365ApplicationOnlyConnectionSettings -OfficeOrganizationName @tech-365.tech -ApplicationId 22b5dd21-5ccf-4696-8482-eda0a1c7d32b -ApplicationCertificatePath "C:\certificate\cert.pfx" -ApplicationCertificatePassword $securepassword

Add-VBOOrganization -Office365SharePointConnectionsSettings $appSettings

Perform the following steps:

  1. Run the Read-Host cmdlet. Specify the message that the console will display as a prompt. Provide the AsSecureString parameter. Save the result to the $securepassword variable.
  2. Enter the password.
  3. Run the New-VBOOffice365ApplicationOnlyConnectionSettings cmdlet. Specify the OfficeOrganizationName, ApplicationId, ApplicationCertificatePath, ApplicationCertificatePassword parameters. Save the result to the $appSettings variable.
  4. Run the Add-VBOOrganization cmdlet. Set the $appSettings variable as the Office365SharePointConnectionsSettings parameter value.

Examples for Modern Authentication and Legacy Protocols

These examples provide instructions on adding Microsoft organizations to the Veeam Backup for Microsoft 365 infrastructure using modern authentication with legacy protocols allowed.

Add-VBOOrganizationExample 4. Adding Microsoft Organization to Back Up Exchange Online

This example shows how to add a Microsoft organization to the Veeam Backup for Microsoft 365 infrastructure. Veeam Backup for Microsoft 365 will back up Microsoft Exchange Online.

$credentials = Get-Credential

$connection = New-VBOOffice365ConnectionSettings -Credential $Credentials -GrantRolesAndPermissions

Add-VBOOrganization -Name "ABC Organization" -Office365ExchangeConnectionsSettings $connection

Perform the following steps:

  1. Run the Get-Credential cmdlet. Enter credentials. Save the result to the $credentials variable.
  1. Run the New-VBOOffice365ConnectionSettings cmdlet. Set the $credentials as the Credential parameter value. Provide the GrantRolesAndPermissions parameter. Save the result to the $connection variable.
  2. Run the Add-VBOOrganization cmdlet. Specify the Name parameter value. Set the $connection variable as the Office365ExchangeConnectionsSettings parameter value.

Add-VBOOrganizationExample 5. Adding Microsoft Organization to Back Up Several Microsoft Services

This example shows how to add a Microsoft organization to the Veeam Backup for Microsoft 365 infrastructure to back up the following services:

  • Microsoft Exchange Online.
  • Microsoft SharePoint Online and Microsoft OneDrive for Business.

$credentials = Get-Credential

$connection = New-VBOOffice365ConnectionSettings -Credential $Credentials -GrantRolesAndPermissions

Add-VBOOrganization -Name "ABC Organization" -Office365ExchangeConnectionsSettings $connection -Office365SharePointConnectionsSettings $connection

Perform the following steps:

  1. Run the Get-Credential cmdlet. Enter credentials. Save the result to the $credentials variable.
  2. Run the New-VBOOffice365ConnectionSettings cmdlet. Set the $credentials as the Credential parameter value. Provide the GrantRolesAndPermissions parameter. Save the result to the $connection variable.
  3. Run the Add-VBOOrganization cmdlet. Specify the following settings:
  • Specify the Name parameter value.
  • Set the $connection variable as the Office365ExchangeConnectionsSettings parameter value.
  • Set the $connection variable as the Office365SharePointConnectionsSettings parameter value.

Add-VBOOrganizationExample 6. Adding On-Premises Microsoft Organizations to Back Up Microsoft Exchange Server

This example shows how example shows how to add an on-premises Microsoft organization to back up Microsoft Exchange server.

$Credentials = Get-Credential

$onPremSettings = New-VBOOnPremConnectionSettings -Credential $Credentials -ServerName Support.North

Add-VBOOrganization -Name "ABC Organization" -OnPremExchangeConnectionSettings $onPremSettings

Perform the following steps:

  1. Run the Get-Credential cmdlet. Enter credentials you want to use for authenticating with a Microsoft Exchange on-premises organization. Save the result to the $Credentials variable.
  2. Run the New-VBOOnPremConnectionSettings cmdlet. Set the $Credentials variable as the Credential parameter value. Specify the ServerName parameter value. Save the result to the $onPremSettings variable.
  3. Run the Add-VBOOrganization cmdlet. Specify the Name parameter value. Set the $onPremSettings variable as the OnPremExchangeConnectionSettings parameter value.

Related Commands