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

Get-VESPItem

In this article

    Short Description

    Returns SharePoint items.

    Applies to

    Product Edition: Community, Standard, Enterprise, Enterprise Plus

    Syntax

    This cmdlet provides parameter sets that allow you to:

    • To get items from a SharePoint list:

    Get-VESPItem [-List] <VESPList> [-Query <string>] [-Recurse]  [<CommonParameters>]

    • To get items from a parent item:

    Get-VESPItem [-ParentItem] <VESPItem> [-Query <string>] [-Recurse]  [<CommonParameters>]

    • To get items from a Sharepoint database.

    Get-VESPItem [-Database] <VESPDatabase[]> [-Query <String>] [<CommonParameters>]

    • To get items from a SharePoint organization:

    Get-VESPItem [-Organization] <VESPOrganization[]> [-Query <string>]  [<CommonParameters>]

    • To get items from a SharePoint site:

    Get-VESPItem [-Site] <VESPSite> [-Query <string>]  [<CommonParameters>]

    Detailed Description

    This cmdlet returns SharePoint items. You can search the organization, site or list to get the necessary item or to get all children of a specific item.

    Parameters

    Parameter

    Description

    Required

    Position

    Accept
    Pipeline
    Input

    Accept
    Wildcard
    Characters

    List

    Specifies a SharePoint list. This cmdlet will return SharePoint items from this list.

    Accepts the VESPList object. To get this object, run the Get-VESPList cmdlet.

    True

    0

    True (ByValue)

    False

    ParentItem

    Specifies a parent item. The cmdlet will return only one sub-level child items for this item.

    Accepts the VESPItem object. To get this object, run the Get-VESPItem cmdlet.

    True

    0

    True (ByValue)

    False

    Database

    Specifies an array of databases. The cmdlet will get items from the specified databases.

    NOTE: This parameter is available for SahrePoint databases backed up by means of Veeam Backup & Replication.

    Accepts the VESPDatabase[] object. To get this object, run the Get-VESPDatabase cmdlet.

    True

    0

    True (ByValue)

    False

    Organization

    Specifies an organization. The cmdlet will return the document library from this organization.

    Accepts the VESPOrganization[] object. To get this object, run the Get-VESPOrganization cmdlet.

    True

    0

    True (ByValue)

    False

    Site

    Specifies a name of the SharePoint site. This cmdlet will return SharePoint items from the specified SharePoint site.

    Accepts the VESPSite object. To get this object, run the Get-VESPSite cmdlet.

    True

    0

    True (ByValue)

    False

    Query

    Allows using keywords for item search. The cmdlet will return items that match the search query from the specified database, site, list or item.

    False

    Named

    False

    True

    Recurse

    Indicates that the cmdlet will return items from all subfolders of the specified parent folder.

    False

    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.

    Example 1

    [For Veeam Backup for Microsoft Office 365] This example shows how to get a SharePoint item from the ABC organization.

    1. Run the Get-VBOSharePointItemRestoreSession cmdlet to get an active restore session. Save the result to the $session variable
    2. Run the Get-VESPOrganization cmdlet with the $session variable and the Name parameter to get the ABC SharePoint organization. Save the result to the $organization variable.
    3. Run the Get-VESPItem cmdlet with the $organization variable and enter a value for the Query parameter to get the SharePoint item.

    $session = Get-VBOSharePointItemRestoreSession

    $organization = Get-VESPOrganization -Session $session -Name "ABC"

    Get-VESPItem -Organization $organization -Query

    Example 2

    [For Veeam Backup for Microsoft Office 365] This example shows how to get a Sharepoint item from the Teams SharePoint site.

    1. Run the Get-VBOSharePointItemRestoreSession cmdlet to get an active restore session. Save the result to the $session variable.
    2. Run the Get-VESPOrganization cmdlet with the $session variable and the Name parameter to get the ABC SharePoint organization. Save the result to the $organization variable.
    3. Run the Get-VESPSite cmdlet with the $organization variable and the Name parameter to get the Teams SharePoint site. Save the result to the $site variable.
    4. Run the Get-VESPItem cmdlet with the $site variable and enter the value for the Query parameter to get the SharePoint item.

    $session = Get-VBOSharePointItemRestoreSession

    $organization = Get-VESPOrganization -Session $session -Name "ABC"

    $site = Get-VESPSite -Organization $organization -Name "Teams"

    Get-VESPItem -Site $site -Query

    Example 3

    [For Veeam Backup for Microsoft Office 365] This example shows how to get a SharePoint item from the ABC One SharePoint list.

    1. Run the Get-VBOSharePointItemRestoreSession cmdlet to get an active restore session. Save the result to the $session variable.
    2. Run the Get-VESPOrganization cmdlet with the $session variable and the Name parameter to get the ABC SharePoint organization. Save the result to the $organization variable.
    3. Run the Get-VESPList cmdlet with the $organization variable and the Name parameter to get the ABC One SharePoint list. Save the result to the $list variable.
    4. Run the Get-VESPItem cmdlet with the $list variable and enter the value for the Query parameter to get the SharePoint item.

    $session = Get-VBOSharePointItemRestoreSession

    $organization = Get-VESPOrganization -Session $session -Name "ABC"

    $list = Get-VESPList -Organization $organization -Name "ABC One"

    Get-VESPItem -List $list -Query

    Example 4

    [For Veeam Backup for Microsoft Office 365] This example shows how to get children items for the Reports item.

    1. Run the Get-VBOSharePointItemRestoreSession cmdlet to get an active restore session. Save the result to the $session variable.
    2. Run the Get-VESPOrganization cmdlet with the $session variable and the Name parameter to get the ABC SharePoint organization. Save the result to the $organization variable.
    3. Run the Get-VESPItem cmdlet with the $organization variable and enter the Reports value for the Query parameter to get the Reports SharePoint item. Save the result to the $parentItem variable.
    4. Run the Get-VESPItem cmdlet with the $parentItem variable and the Recurse parameter to get children of the Reports SharePoint item.

    $session = Get-VBOSharePointItemRestoreSession

    $organization = Get-VESPOrganization -Session $session -Name "ABC"

    $parentItem = Get-VESPItem -Organization $organization -Query "Reports"

    Get-VESPItem -ParentItem $parentItem -Recurse

    Example 5

    [For Veeam Backup & Replication] This example shows how to get all SharePoint items from the WSS_Content.mdf database.

    1. Run the Get-VBRSharePointItemRestoreSession cmdlet to get an active restore session. Save the result to the $session variable.
    2. Run the Get-VESPDatabase cmdlet with the $session variable and the Name parameter to get the WSS_Content.mdf SharePoint database. Save the result to the $database variable.
    3. Run the Get-VESPItem cmdlet with the $database variable to get all SharePoint items from the WSS_Content.mdf database.

    $session = Get-VBRSharePointItemRestoreSession

    Get-VESPDatabase -Session $session -Name "WSS_Content.mdf"

    Get-VESPItem -Database $database

    Example 6

    [For Veeam Backup & Replication] This example shows how to get an item from the Teams SharePoint site.

    1. Run the Get-VBRSharePointItemRestoreSession cmdlet to get an active restore session. Save the result to the $session variable.
    2. Run the Get-VESPDatabase cmdlet with the $session variable and the Name parameter to get the WSS_Content.mdf SharePoint database. Save the result to the $database variable.
    3. Run the Get-VESPSite cmdlet with the $organization variable and the Name parameter to get the Teams SharePoint site. Save the result to the $site variable.
    4. Run the Get-VESPItem cmdlet with the $site variable and enter the value for the Query parameter to get a SharePoint item.

    $session = Get-VBRSharePointItemRestoreSession

    $database = Get-VESPDatabase -Session $session -Name "WSS_Content.mdf"

    $site = Get-VESPSite -Database $database -Name "Teams"

    Get-VESPItem -Site $site -Query

    Example 7

    [For Veeam Backup & Replication] This example shows how to get a SharePoint item from the Color names SharePoint list.

    1. Run the Get-VBRSharePointItemRestoreSession cmdlet to get an active restore session. Save the result to the $session variable.
    2. Run the Get-VESPDatabase cmdlet with the $session variable and the Name parameter to get the WSS_Content.mdf SharePoint database. Save the result to the $database variable.
    3. Run the Get-VESPList cmdlet with the $database variable and the Name parameter to get the Color names SharePoint list. Save the result to the $list variable.
    4. Run the Get-VESPItem cmdlet with the $list variable and enter the value for the Query parameter to get the SharePoint item.

    $session = Get-VBRSharePointItemRestoreSession

    $database = Get-VESPDatabase -Session $session -Name "WSS_Content.mdf"

    $list = Get-VESPList -Database $database -Name "Color names"

    Get-VESPItem -List $list -Query

    Example 8

    [For Veeam Backup & Replication] This example shows how to get the children items for the Reports SharePoint item.

    1. Run the Get-VBRSharePointItemRestoreSession cmdlet to get an active restore session. Save the result to the $session variable.
    2. Run the Get-VESPDatabase cmdlet with the $session variable and the Name parameter to get the WSS_Content.mdf SharePoint database. Save the result to the $database variable.
    3. Run the Get-VESPItem cmdlet with the $database variable and enter the Reports value for the Query parameter to get the Reports SharePoint item. Save the result to the $parentItem variable.
    4. Run the Get-VESPItem cmdlet with the $parentItem variable and the Recurse parameter to get children of the Reports SharePoint item.

    $session = Get-VBRSharePointItemRestoreSession

    $database = Get-VESPDatabase -Session $session -Name "WSS_Content.mdf"

    $parentItem = Get-VESPItem -Database $database -Query "Reports

    Get-VESPItem -ParentItem $parentItem -Recurse

    Related Commands