This is an archive version of the document. To get the most up-to-date information, see the current version.

Find-VBRADEntity

Short Description

Looks for Active Directory objects.

Applies to

Product Edition: Community, Standard, Enterprise, Enterprise Plus

Syntax

This cmdlet provides four parameter sets.

  • For getting all Active Directory objects.

Find-VBRADEntity -Domain <VBRADDomain> [-Root <VBRADEntity>] [-Recurse]  [<CommonParameters>]

  • For getting Active Directory objects by ID.

Find-VBRADEntity -Domain <VBRADDomain> [-Id <guid[]>] [-Root <VBRADEntity>] [-Recurse]  [<CommonParameters>]

  • For getting Active Directory objects by name.

Find-VBRADEntity -Domain <VBRADDomain> [-Name <string[]>] [-Root <VBRADEntity>] [-Recurse]  [<CommonParameters>]

  • For getting Active Directory objects of a specified type.

Find-VBRADEntity -Domain <VBRADDomain> [-Type <VBRADEntityType[]> {Domain | Cluster | OrganizationUnit | Group | Folder | Computer}] [-Root <VBRADEntity>] [-Recurse]  [<CommonParameters>]

Detailed Description

This cmdlet looks for Active Directory objects.

You can use this cmdlet to search for Active Directory objects you plan to add to the scope of a protection group.

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

Id

Specifies the array of object IDs. The cmdlet will return objects with these IDs.

False

Named

True (ByProperty
Name)

False

Name

Specifies the array of object names. The cmdlet will return objects with these names.

False

Named

True (ByProperty
Name)

True

Type

Specifies the array of object types:

  • Domain
  • Cluster
  • OrganizationUnit
  • Group
  • Folder
  • Computer

The cmdlet will return objects of these types.

False

Named

True (ByProperty
Name)

False

Root

Specifies the container of objects. The cmdlet will look for objects in this container.

If omitted, the cmdlet will look for objects in the domain container.

False

Named

True (ByProperty
Name)

False

Recurse

Indicates that the cmdlet will look for objects from all child containers of the specified container.

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

VBRADEntity

Example 1

This example shows how to get all Active Directory objects.

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 Active Directory objects. Use the Recurse parameter to get objects from all child containers.

$connection = Get-VBRADDomain -ServerName support.east -Credentials support\jsmith

Find-VBRADEntity -Domain $connection -Recurse

Example 2

This example shows how to get Active Directory objects with names containing "account".

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 and Name parameter to get objects with the specified name. Use the Recurse parameter to get objects from all child containers.

$connection = Get-VBRADDomain -ServerName support.east -Credentials support\jsmith

Find-VBRADEntity -Domain $connection -Name *account* -Recurse

Example 3

This example shows how to get Active Directory objects from the "Accounts" 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 $accounts variables to get the objects from the container. Use the Recurse parameter to get objects from all child containers.

$connection = Get-VBRADDomain -ServerName support.east -Credentials support\jsmith

$root = Find-VBRADEntity -Domain $connection

$accounts = Find-VBRADEntity -Domain $connection -Root $root -Name Accounts

Find-VBRADEntity -Domain $connection -Root $accounts -Recurse

Example 4

This example shows how to get all Active Directory objects of the OrganizationUnit type.

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 and Type parameter to get OrganizationUnit type objects. Use the Recurse parameter to get objects from all child containers

$connection = Get-VBRADDomain -ServerName support.east -Credentials support\jsmith

Find-VBRADEntity -Domain $connection -Type OrganizationUnit -Recurse

Example 5

This example shows how to get Active Directory objects by ID.

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 and the array of object IDs.

$connection = Get-VBRADDomain -ServerName support.east -Credentials support\jsmith

Find-VBRADEntity -Domain $connection -Id 3826d21c-0f7d-4c80-b5ef-b5568e967a6a, 85950671-5e3a-481f-8408-5af40de317c6

Example 6

This example shows how to get an Active Directory object using both Veeam PowerShell and Microsoft Active Directory Windows PowerShell cmdlets.

You will need to perform the following steps:

  1. Make sure you have the Active Directory Windows PowerShell module installed. For more information, see https://technet.microsoft.com/en-us/library/dd378783(WS.10).aspx#Anchor_5
  2. Run Get-ADComputer to get the Active Directory computer. Save the result to the $comp variable.
  3. Get the ID of the Active Directory computer. Use the ObjectGUID property of the computer object saved to the $comp variable. Save the result to the $compid variable.
  4. Run Get-VBRADDomain to create the Active Directory domain connection object. Save the result to the $connection variable.
  5. Run Find-VBRADEntity with the $connection and $compid variables.

$comp = Get-ADComputer SUPP-G3321

$compid = $comp.ObjectGUID

$connection = Get-VBRADDomain -ServerName support.east -Credentials support\jsmith

Find-VBRADEntity -Domain $connection -Id $compid

Related Commands

Get-VBRADDomain