Get-PnPSite
SYNOPSIS
Returns the current site collection from the context.
SYNTAX
Get-PnPSite [-Connection <PnPConnection>] [-Includes <String[]>]
DESCRIPTION
Allows to retrieve current site collection from the context.
EXAMPLES
EXAMPLE 1
Get-PnPSite
Gets the current site
EXAMPLE 2
Get-PnPSite -Includes RootWeb,ServerRelativeUrl
Gets the current site specifying to include RootWeb and ServerRelativeUrl properties. For the full list of properties see https://learn.microsoft.com/previous-versions/office/sharepoint-server/ee538579(v%3doffice.15)
PARAMETERS
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: PnPConnection
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Includes
Optionally allows properties to be retrieved for the returned site which are not included in the response by default
Type: String[]
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False