New-VBRADContainer
Short Description
Creates a scope of Active Directory objects for a protection group.
Applies to
Product Edition: Community, Standard, Enterprise, Enterprise Plus, Veeam Universal 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 | Accept |
---|---|---|---|---|---|
Domain | Specifies the Active Directory domain connection object. Accepts VBRADDomain type. | True | Named | True (ByValue, | 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:
NOTE: You cannot add Domain Local or Universal groups. Accepts VBRADEntity[] type. | True | Named | True (ByProperty | 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 | False |
ExcludeOfflineComputers | 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 | 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 | 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 | 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 | False |
UseCustomCredentials | 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 | False |
CustomCredentials | Specifies custom credentials for authenticating with associated Active Directory objects. Accepts VBRADCustomCredentials[] type. | False | Named | True (ByProperty | False |
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About CommonParameters section of Microsoft Docs.
Return Type
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:
- 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.
$connection = Get-VBRADDomain -ServerName support.east -Credentials support\jsmith $root = Find-VBRADEntity -Domain $connection $accounts = Find-VBRADEntity -Domain $connection -Root $root -Name "Accounts" $servers = Find-VBRADEntity -Domain $connection -Root $root -Name "Servers" $creds = Get-Credential $custom = New-VBRADCustomCredentials -Entity $servers -Credentials $creds 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:
- 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.
- Create a protection group. Run Add-VBRProtectionGroup with the $adscope variable.
$connection = Get-VBRADDomain -ServerName support.east -Credentials support\jsmith $root = Find-VBRADEntity -Domain $connection $accounts = Find-VBRADEntity -Domain $connection -Root $root -Name "Accounts" $servers = Find-VBRADEntity -Domain $connection -Root $root -Name "Servers" $creds = Get-Credential $custom = New-VBRADCustomCredentials -Entity $servers -Credentials $creds $adscope = New-VBRADContainer -Domain $connection -Entity $root -ExcludeOfflineComputers -ExcludeComputers -ExcludedEntity $accounts -MasterCredentials support\jsmith -UseCustomCredentials -CustomCredentials $custom Add-VBRProtectionGroup -Name "AD" -Description "Protection Group" -Container $adscope |
Related Commands