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

Get-VESPSite

In this article

    Short Description

    Returns SharePoint sites.

    Applies to

    Product Edition: Community, Standard, Enterprise, Enterprise Plus

    Syntax

    This cmdlet provides parameter sets that allow you to:

    • To get sites from a Sharepoint database.

    Get-VESPSite [-Database] <VESPDatabase> [[-Name] <String[]>] [-Recurse <SwitchParameter>] [<CommonParameters>]

    • To get sites from a SharePoint organization:

    Get-VESPSite -Organization <VESPOrganization> [-Name <string[]>] [-Recurse]  [<CommonParameters>]

    • To get a SharePoint site from a parent site:

    Get-VESPSite -ParentSite <VESPSite> [-Name <string[]>] [-Recurse]  [<CommonParameters>]

    Detailed Description

    This cmdlet returns SharePoint sites. You can search for a SharePoint site or all children of a parent SharePoint site to get the necessary item.

    Parameters

    Parameter

    Description

    Required

    Position

    Accept
    Pipeline
    Input

    Accept
    Wildcard
    Characters

    Database

    Specifies a database. The cmdlet will get sites from the specified database.

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

    Tru

    0

    True (ByValue)

    False

    Organization

    Specifies an organization. The cmdlet will return items from this organization.

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

    True

    0

    True (ByValue)

    False

    ParentSite

    Specifies a name of a SharePoint parent site. This cmdlet will return one sub-level children of the specified site.

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

    True

    0

    True (ByValue)

    False

    Name

    Specifies an array of names for a SharePoint site. This cmdlet will return SharePoint sites with the specified names.

    False

    1

    False

    True

    Recurse

    Indicates that the cmdlet will return all children items of the specified item.

    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 Team Site SharePoint site from the ABC SharePoint 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 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 Team Site site.

    $session = Get-VBOSharePointItemRestoreSession

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

    Get-VESPSite -Organization $organization -Name "Team Site"

    Example 2

    [For Veeam Backup for Microsoft Office 365] This example shows how to get all children sites from the Team Site parent site.

    1. Run the Get-VBOSharePointItemRestoreSession cmdlet to get the 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 Team Site site.
    4. Run the Get-VESPSite cmdlet with the $parentSite variable and the Name parameter to get the children sites of the Team Site site.

    $session = Get-VBOSharePointItemRestoreSession

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

    $parentSite = Get-VESPSite -Organization $organization -Name "Team Site"

    Get-VESPSite -ParentSite $parentSite -Recurse

    Example 3

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

    $session = Get-VBRSharePointItemRestoreSession

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

    Get-VESPSite -Database $database

    Example 4

    [For Veeam Backup & Replication] This example shows how to get all children sites from the Teams parent site.

    1. Run the Get-VBRSharePointItemRestoreSession cmdlet to get the 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 SharePoint 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 site.
    4. Run the Get-VESPSite cmdlet with the $parentSite variable and the Name parameter to get the children sites of the Teams site.

    $session = Get-VBRSharePointItemRestoreSession

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

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

    Get-VESPSite -ParentSite $parentSite -Recurse

    Related Commands