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

Get-VESPDocumentLibrary

In this article

    Short Description

    Returns SharePoint document libraries.

    Applies to

    Product Edition: Community, Standard, Enterprise, Enterprise Plus

    Syntax

    This cmdlet provides parameter sets that allow you to:

    • To get a document library from a backed-up SharePoint database.

    Get-VESPDocumentLibrary [-Database] <VESPDatabase> [[-Name] <String[]>] [<CommonParameters>]

    • To get a document library from a SharePoint organization:

    Get-VESPDocumentLibrary -Organization <VESPOrganization> [-Name <string[]>]  [<CommonParameters>]

    • To get a document library from a SharePoint site:

    Get-VESPDocumentLibrary -Site <VESPSite> [-Name <string[]>] [-Recurse]  [<CommonParameters>]

    Detailed Description

    This cmdlet returns document libraries. You can search the SharePoint database, site or the whole organization to get a specific document library.

    Parameters

    Parameter

    Description

    Required

    Position

    Accept
    Pipeline
    Input

    Accept
    Wildcard
    Characters

    Database

    Specifies a backed-up SharePoint database. The cmdlet will return document libraries from the specified database.

    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 the name of the SharePoint site. This cmdlet will return a document library from a specified SharePoint site.

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

    True

    0

    True (ByValue)

    False

    Name

    Specifies the name of the SharePoint document library. This cmdlet will return a document library with a specified name.

    False

    1

    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 the Regulations document library from the ABC SharePoint organization.

    1. Run the Get-VBOSharePointItemRestoreSession to get an active restore session. Save the result to the $session variable.
    2. Run the Get-VESPOrganization 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-VESPDocumentLibrary with the $organization variable and the Name parameter to get the Regulations document library.

    $session = Get-VBOSharePointItemRestoreSession

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

    Get-VESPDocumentLibrary -Organization $organization -Name "Regulations"

    Example 2

    [For Veeam Backup for Microsoft Office 365] This example shows how to get the Regulations document library 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 to get the ABC 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.
    4. Run the Get-VESPDocumentLibrary cmdlet with the $site variable and the Name parameter to get the Regulations document library.

    $session = Get-VBOSharePointItemRestoreSession

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

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

    Get-VESPDocumentLibrary -Site $site -Name "Regulations"

    Example 3

    [For Veeam Backup & Replication] This example shows how to get all SharePoint document libraries from the WSS_Content.mdf SharePoint 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-VESPDocumentLibrary cmdlet with the $database variable to get all SharePoint document libraries from the WSS_Content.mdf SharePoint database.

    $session = Get-VBRSharePointItemRestoreSession

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

    Get-VESPDocumentLibrary -Database $database

    Example 4

    [For Veeam Backup & Replication] This example shows how to get the Regulations document library 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-VESPDatabase cmdlet with the $session variable to get the WSS_Content.mdf database. Save the result to the $database variable.
    3. Run the Get-VESPSite cmdlet with the $database variable and the Name parameter to get the Teams SharePoint site.
    4. Run the Get-VESPDocumentLibrary cmdlet with the $site variable and the Name parameter to get the Regulations document library.

    $session = Get-VBRSharePointItemRestoreSession

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

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

    Get-VESPDocumentLibrary -Site $site -Name "Regulations"

    Related Commands