Get-VESPDocumentLibrary
Short Description
Returns SharePoint document libraries.
Product: Veeam Backup & Replication, Veeam Backup for Microsoft 365
Product Edition: Community, Standard, Enterprise, Enterprise Plus, Veeam Universal License
Syntax
This cmdlet provides the following parameter sets:
-
DatabaseParameterSet
|
Get-VESPDocumentLibrary [-Database] <VESPDatabase> [[-Name] <String[]>] [<CommonParameters>] |
-
OrganizationParameterSet
|
Get-VESPDocumentLibrary [-Organization] <VESPOrganization> [[-Name] <String[]>] [<CommonParameters>] |
-
SiteParameterSet
|
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
Parameters
|
Parameter
|
Description
|
Type
|
Required
|
Position
|
Accept Pipeline Input
|
|
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-VESPDatabaseReturns backed-up Microsoft SharePoint databases. cmdlet.
|
VESPDatabase
|
True
|
0
|
True (ByValue)
|
|
Name
|
Specifies an array of SharePoint document library names. This cmdlet will return an array of document libraries with the specified names.
This parameter accepts wildcard characters.
|
String[]
|
False
|
1
|
False
|
|
Organization
|
Specifies a SharePoint organization. The cmdlet will return document libraries from this organization.
Accepts the VESPOrganization object. To get this object, run the Get-VESPOrganizationReturns SharePoint organizations added to Veeam Backup for Microsoft 365. cmdlet.
|
VESPOrganization
|
True
|
0
|
True (ByValue)
|
|
Recurse
|
Defines that the cmdlet will return all child items of the specified parent item.
Default: False
|
SwitchParameter
|
False
|
Named
|
False
|
|
Site
|
Specifies a name of the SharePoint site. This cmdlet will return a document library from the specified SharePoint site.
Accepts the VESPSite object. To get this object, run the Get-VESPSiteReturns SharePoint sites. cmdlet.
|
VESPSite
|
True
|
0
|
True (ByValue)
|
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About Common Parameters section of Microsoft Learn.
Output Object
The cmdlet returns the VESPDocumentLibrary[] array that contains SharePoint document libraries.
Examples
Example 1. Getting SharePoint Document Library from SharePoint Database [For Veeam Backup & Replication]
|
This example shows how 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 |
Perform the following steps:
- Run the
Get-VBRSharePointItemRestoreSessionReturns active restore sessions started to perform operations with backed-up Microsoft SharePoint databases. cmdlet. Save the result to the $session variable.
- Run the
Get-VESPDatabaseReturns backed-up Microsoft SharePoint databases. cmdlet. Set the $session variable as the Session parameter value. Specify the Name parameter value. Save the result to the $database variable.
- Run the
Get-VESPDocumentLibrary cmdlet. Set the $database variable as the Database parameter value.
|
Example 2. Getting SharePoint Document Library from SharePoint Site [For Veeam Backup & Replication]
|
This example shows how to get the Regulations document library from the Teams SharePoint site.
|
$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" |
Perform the following steps:
- Get a SharePoint site:
- Run the
Get-VBRSharePointItemRestoreSessionReturns active restore sessions started to perform operations with backed-up Microsoft SharePoint databases. cmdlet. Save the result to the $session variable.
- Run the
Get-VESPDatabaseReturns backed-up Microsoft SharePoint databases. cmdlet. Set the $session variable as the Session parameter value. Specify the Name parameter value. Save the result to the $database variable.
- Run the
Get-VESPSiteReturns SharePoint sites. cmdlet. Set the $database variable as the Database parameter value. Specify the Name parameter value. Save the result to the $site variable.
- Run the
Get-VESPDocumentLibrary cmdlet. Set the $site variable as the Site parameter value. Specify the Name parameter value.
|
Example 3. Getting SharePoint Document Library from Microsoft Organization [For Veeam Backup for Microsoft 365]
|
This example shows how to get the Regulations document library from the ABC Microsoft organization.
|
$session = Get-VBOSharePointItemRestoreSession
$organization = Get-VESPOrganization -Session $session -Name "ABC*"
Get-VESPDocumentLibrary -Organization $organization -Name "Regulations" |
Perform the following steps:
- Run the
Get-VBOSharePointItemRestoreSessionReturns active restore sessions started to perform operations with backed-up SharePoint items. cmdlet. Save the result to the $session variable.
- Run the
Get-VESPOrganizationReturns SharePoint organizations added to Veeam Backup for Microsoft 365. cmdlet. Set the $session variable as the Session parameter value. Specify the Name parameter value. Use the * wildcard character to substitute the timestamp. Save the result to the $organization variable.
- Run the
Get-VESPDocumentLibrary cmdlet. Set the $organization variable as the Organization parameter value. Specify the Name parameter value.
|
Example 4. Getting SharePoint Document Library from SharePoint Site [For Veeam Backup for Microsoft 365]
|
This example shows how to get the Regulations document library from the Teams SharePoint site.
|
$session = Get-VBOSharePointItemRestoreSession
$organization = Get-VESPOrganization -Session $session -Name "ABC*"
$site = Get-VESPSite -Organization $organization -Name "Teams"
Get-VESPDocumentLibrary -Site $site -Name "Regulations" |
Perform the following steps:
- Get a SharePoint site:
- Run the
Get-VBOSharePointItemRestoreSessionReturns active restore sessions started to perform operations with backed-up SharePoint items. cmdlet. Save the result to the $session variable.
- Run the
Get-VESPOrganizationReturns SharePoint organizations added to Veeam Backup for Microsoft 365. cmdlet. Set the $session variable as the Session parameter value. Specify the Name parameter value. Use the * wildcard character to substitute the timestamp. Save the result to the $organization variable.
- Run the
Get-VESPSiteReturns SharePoint sites. cmdlet. Set the $organization variable as the Organization parameter value. Specify the Name parameter value. Save the result to the $site variable.
- Run the
Get-VESPDocumentLibrary cmdlet. Set the $site variable as the Site parameter value. Specify the Name parameter value.
|
Related Commands