Get-VESPDocumentVersion
Short Description
Returns versions of SharePoint documents.
Applies to
Veeam Backup & Replication, Veeam Backup for Microsoft 365
Product Edition: Community, Standard, Enterprise, Enterprise Plus, Veeam Universal License
Syntax
Get-VESPDocumentVersion [-Document] <VESPDocument> [<CommonParameters>] |
Detailed Description
This cmdlet returns versions of SharePoint documents.
Parameters
Parameter | Description | Type | Required | Position | Accept Pipeline Input |
---|
Document | Specifies a SharePoint document. This cmdlet will return version of this SharePoint document. | Accepts the VESPDocument object. To get this object, run the Get-VESPDocument cmdlet. | True | 0 | True (ByValue) |
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About CommonParameters section of Microsoft Docs.
Output Object
The cmdlet returns the VESPDocumentVersion object that contains a version of the specified SharePoint document.
Examples
Example 1. Getting Version of SharePoint Document from Site [For Veeam Backup & Replication]
This example shows how to get a version of the reports.txt document from the Teams site. $session = Get-VBRSharePointItemRestoreSession $database = Get-VESPDatabase -Session $session -Name "WSS_Content.mdf" $site = Get-VESPSite -Database $database -Name "Teams" $document = Get-VESPDocument -Site $site -Query "reports.txt" Get-VESPDocumentVersion -Document $document |
Perform the following steps: - Run the Get-VBRSharePointItemRestoreSession cmdlet. Save the result to the $session variable.
- Run the Get-VESPDatabase 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-VESPSite 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-VESPDocument cmdlet. Set the $site variable as the Site parameter value. Specify the Query parameter value. Save the result to the $document variable.
- Run the Get-VESPDocumentVersion cmdlet. Set the $document variable as the Document parameter value.
|
Example 2. Getting Version of SharePoint Document from Document Library [For Veeam Backup & Replication]
This example shows how to get a version of the reports.txt document from the Regulations SharePoint document library. $session = Get-VBRSharePointItemRestoreSession $database = Get-VESPDatabase -Session $session -Name "WSS_Content.mdf" $documentLibrary = Get-VESPDocumentLibrary -Database $database -Name "Regulations" $document = Get-VESPDocument -DocumentLibrary $documentLibrary -Query "reports.txt" Get-VESPDocumentVersion -Document $document |
Perform the following steps: - Run the Get-VBRSharePointItemRestoreSession cmdlet. Save the result to the $session variable.
- Run the Get-VESPDatabase 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. Specify the Name parameter value. Save the result to the $documentLibrary variable.
- Run the Get-VESPDocument cmdlet. Set the $documentLibrary variable as the DocumentLibrary parameter value. Specify the Query parameter value. Save the result to the $document variable.
- Run the Get-VESPDocumentVersion cmdlet. Set the $document variable as the Document parameter value.
|
Example 3. Getting Version of SharePoint Document from Site [For Veeam Backup for Microsoft 365]
This example shows how to get a version of the reports.txt document from the Teams site. $session = Get-VBOSharePointItemRestoreSession $organization = Get-VESPOrganization -Session $session -Name "ABC*" $site = Get-VESPSite -Organization $organization -Name "Team Site" $document = Get-VESPDocument -Site $site -Query "reports.txt" Get-VESPDocumentVersion -Document $document |
Perform the following steps: - Run the Get-VBOSharePointItemRestoreSession cmdlet. Save the result to the $session variable.
- Run the Get-VESPOrganization 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-VESPSite 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-VESPDocument cmdlet. Set the $site variable as the Site parameter value. Specify the Query parameter value. Save the result to the $document variable.
- Run the Get-VESPDocumentVersion cmdlet. Set the $document variable as the Document parameter value.
|
Example 4. Getting Version of SharePoint Document from Document Library [For Veeam Backup for Microsoft 365]
This example shows how to get a version of the reports.txt document from the Regulations SharePoint document library. $session = Get-VBOSharePointItemRestoreSession $organization = Get-VESPOrganization -Session $session -Name "ABC*" $documentLibrary = Get-VESPDocumentLibrary -Organization $organization -Name "Regulations" $document = Get-VESPDocument -DocumentLibrary $documentLibrary -Query "report.txt" Get-VESPDocumentVersion -Document $document |
Perform the following steps: - Run the Get-VBOSharePointItemRestoreSession cmdlet. Save the result to the $session variable.
- Run the Get-VESPOrganization 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. Save the result to the $documentLibrary variable.
- Run the Get-VESPDocument cmdlet. Set the $documentLibrary variable as the DocumentLibrary parameter value. Specify the Query parameter value. Save the result to the $document variable.
- Run the Get-VESPDocumentVersion cmdlet. Set the $document variable as the Document parameter value.
|
Example 5. Getting Version of SharePoint Document from Organization [For Veeam Backup for Microsoft 365]
This example shows how to get a version of the reports.txt document from the ABC SharePoint organization. $session = Get-VBOSharePointItemRestoreSession $organization = Get-VESPOrganization -Session $session -Name "ABC*" $document = Get-VESPDocument -Organization $organization -Query "report.txt" Get-VESPDocumentVersion -Document $document |
Perform the following steps: - Run the Get-VBOSharePointItemRestoreSession cmdlet. Save the result to the $session variable.
- Run the Get-VESPOrganization 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-VESPDocument cmdlet. Set the $organization variable as the Organization parameter value. Specify the Query parameter value. Save the result to the $document variable.
- Run the Get-VESPDocumentVersion cmdlet. Set the $document variable as the Document parameter value.
|
Related Commands