Help Center
Choose product document...
Veeam Backup & Replication 9.5
PowerShell Reference

New-VBRADContainer

Short Description

Creates a scope of Active Directory objects for a protection group.

Applies to

Product Edition: Standard, Enterprise, Enterprise Plus

Requires Veeam Agent for Microsoft Windows/Veeam Agent for Linux license

Syntax

New-VBRADContainer -Domain <VBRADDomain> -Entity <VBRADEntity[]> -MasterCredentials <CCredentials> [-ExcludeVMs] [-ExcludeOfflineComputers] [-ExcludeComputers] [-ExcludedEntity <VBRADEntity[]>] [-UseCustomCredentials] [-CustomCredentials <VBRADCustomCredentials[]>]  [<CommonParameters>]

Detailed Description

This cmdlet creates the VBRADContainer object. This object contains a scope of Active Directory objects. Use this object to create a protection group with the Add-VBRProtectionGroup cmdlet.

Parameters

Parameter

Description

Required

Position

Accept
Pipeline
Input

Accept
Wildcard
Characters

Domain

Specifies the Active Directory domain connection object.

Accepts VBRADDomain type.

True

Named

True (ByValue,
ByProperty
Name)

False

Entity

Specifies the array of the Active Directory objects from the same domain. The cmdlet will add these objects to the protection scope.

You can add the following types of Active Directory objects:

  • Domain
  • Cluster
  • Organization unit
  • Global group
  • Folder
  • Computer

NOTE: You cannot add Domain Local or Universal groups.

Accepts VBRADEntity[] type.

True

Named

True (ByProperty
Name)

False

ExcludeVMs

Indicates that the cmdlet will exclude all VMs from the protection scope.

By default this parameter is set to True. If you don't want to exclude VMs from the protection scope, set this parameter to False.

False

Named

True (ByProperty
Name)

False

ExcludeOffline
Computers

Indicates that the cmdlet will exclude computers that have been offline for over 30 days.

By default this parameter is set to True. If you don't want to exclude offline computers from the protection scope, set this parameter to False.

False

Named

True (ByProperty
Name)

False

ExcludeComputers

Indicates that you want to exclude some Active Directory objects from the protection scope.

Use the ExcludeEntity parameter to specify objects you want to exclude from the protection scope.

False

Named

True (ByProperty
Name)

False

ExcludedEntity

Specifies Active Directory objects you want to exclude from the protection scope.

NOTE: You cannot exclude Domain Local or Universal groups.

Accepts VBRADEntity[] type.

False

Named

True (ByProperty
Name)

False

MasterCredentials

Specifies Master account credentials for authenticating with all Active Directory objects in a protection scope.

For authenticating with Active Directory objects that require different credentials, Veeam Backup & Replication uses custom credentials. If you want to use custom credentials for some Active Directory objects, set the UseCustomCredentials parameter.

True

Named

True (ByProperty
Name)

False

UseCustom
Credentials

Indicates that you want to use custom credentials for authenticating with some Active Directory objects.

To specify custom credentials, use the CustomCredentials parameter.

False

Named

True (ByProperty
Name)

False

CustomCredentials

Specifies custom credentials for authenticating with associated Active Directory objects.

Accepts VBRADCustomCredentials[] type.

False

Named

True (ByProperty
Name)

False

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information about common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.

Return Type

VBRADContainer

Example 1

This example shows how to create a scope of Active Directory objects.

The cmdlet will create a scope with the following settings:

  • The scope will contain objects of the Active Directory domain container except for the "Accounts" container.
  • All computers that have been offline for over 30 days and VMs will be excluded from the scope.
  • Veeam Backup & Replication will use custom credentials for authenticating with objects from the "Servers" container.

You will need to perform the following steps:

  1. Run Get-VBRADDomain to create the Active Directory domain connection object. Save the result to the $connection variable.
  2. Run Find-VBRADEntity with the $connection variable to get the domain container. Save the result to the $root variable.
  3. Run Find-VBRADEntity with the $connection and $root variables to get the "Accounts" container. Save the result to the $accounts variable.
  4. Run Find-VBRADEntity with the $connection and $root variables to get the "Servers" container. Save the result to the $servers variable.
  5. Run Get-Credential to create a credential object you want to use for authenticating with objects from the "Server" container. Type the credentials and save the result to the $creds variable.
  6. Run New-VBRADCustomCredentials with the $servers and $creds variables. The cmdlet will apply custom credentials to the objects from the "Servers" container. Save the result to the $custom variable.
  7. Run New-VBRADContainer with the $connection, $accounts and $custom variables.

PS C:\PS> $connection = Get-VBRADDomain -ServerName support.east -Credentials support\jsmith

PS C:\PS> $root = Find-VBRADEntity -Domain $connection

PS C:\PS> $accounts = Find-VBRADEntity -Domain $connection -Root $root -Name "Accounts"

PS C:\PS> $servers = Find-VBRADEntity -Domain $connection -Root $root -Name "Servers"

PS C:\PS> $creds = Get-Credential

PS C:\PS> $custom = New-VBRADCustomCredentials -Entity $servers -Credentials $creds

PS C:\PS> New-VBRADContainer -Domain $connection -Entity $root -ExcludeComputers -ExcludedEntity $accounts -MasterCredentials support\jsmith -UseCustomCredentials -CustomCredentials $custom

Example 2

This example shows how to create a protection group with a scope of Active Directory objects.

You will need to perform the following steps:

  1. Create a scope of Active Directory objects:
  • Run Get-VBRADDomain to create the Active Directory domain connection object. Save the result to the $connection variable.
  • Run Find-VBRADEntity with the $connection variable to get the domain container. Save the result to the $root variable.
  • Run Find-VBRADEntity with the $connection and $root variables to get the "Accounts" container. Save the result to the $accounts variable.
  • Run Find-VBRADEntity with the $connection and $root variables to get the "Servers" container. Save the result to the $servers variable.
  • Run Get-Credential to create a credential object you want to use for authenticating with objects from the "Server" container. Type the credentials and save the result to the $creds variable.
  • Run New-VBRADCustomCredentials with the $servers and $creds variables. The cmdlet will apply custom credentials to the objects from the "Servers" container. Save the result to the $custom variable.
  • Run New-VBRADContainer with the $connection, $accounts and $custom variables to create a scope of Active Directory objects. Save the result to the $adscope variable.
  1. Create a protection group. Run Add-VBRProtectionGroup with the $adscope variable.

PS C:\PS> $connection = Get-VBRADDomain -ServerName support.east -Credentials support\jsmith

PS C:\PS> $root = Find-VBRADEntity -Domain $connection

PS C:\PS> $accounts = Find-VBRADEntity -Domain $connection -Root $root -Name "Accounts"

PS C:\PS> $servers = Find-VBRADEntity -Domain $connection -Root $root -Name "Servers"

PS C:\PS> $creds = Get-Credential

PS C:\PS> $custom = New-VBRADCustomCredentials -Entity $servers -Credentials $creds

PS C:\PS> $adscope = New-VBRADContainer -Domain $connection -Entity $root -ExcludeOfflineComputers -ExcludeComputers -ExcludedEntity $accounts -MasterCredentials support\jsmith -UseCustomCredentials -CustomCredentials $custom

PS C:\PS> Add-VBRProtectionGroup -Name "AD" -Description "Protection Group" -Container $adscope

Related Commands

Get-VBRADDomain

Find-VBRADEntity

New-VBRADCustomCredentials

Add-VBRProtectionGroup

Veeam Large Logo

User Guide for VMware vSphere

User Guide for Microsoft Hyper-V

Enterprise Manager User Guide

Veeam Cloud Connect Guide

Veeam Agent Management Guide

Veeam Backup Explorers User Guide

Backup and Restore of SQL Server Databases

PowerShell Reference

RESTful API Reference

Veeam Backup FREE Edition User Guide

Veeam Backup for Microsoft Office 365

Veeam ONE Documentation

Veeam Agent for Windows Documentation

Veeam Agent for Linux Documentation

Veeam Management Pack Documentation