external help file | applicable | schema |
---|---|---|
SharePoint Server 2013, SharePoint Server 2016, SharePoint Online |
2.0.0 |
Executes a search query to retrieve indexed site collections
Get-PnPSiteSearchQueryResults [-StartRow <Int>]
[-MaxResults <Int>]
[-Query <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]
Get-PnPSiteSearchQueryResults [-All [<SwitchParameter>]]
[-Query <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]
PS:> Get-PnPSiteSearchQueryResults
Returns the top 500 site collections indexed by SharePoint Search
PS:> Get-PnPSiteSearchQueryResults -Query "WebTemplate:STS"
Returns the top 500 site collections indexed by SharePoint Search which have are based on the STS (Team Site) template
PS:> Get-PnPSiteSearchQueryResults -Query "WebTemplate:SPSPERS"
Returns the top 500 site collections indexed by SharePoint Search which have are based on the SPSPERS (MySite) template, up to the MaxResult limit
PS:> Get-PnPSiteSearchQueryResults -Query "Title:Intranet*"
Returns the top 500 site collections indexed by SharePoint Search of which the title starts with the word Intranet
PS:> Get-PnPSiteSearchQueryResults -MaxResults 10
Returns the top 10 site collections indexed by SharePoint Search
PS:> Get-PnPSiteSearchQueryResults -All
Returns absolutely all site collections indexed by SharePoint Search
Automatically page results until the end to get more than 500 sites. Use with caution!
Type: SwitchParameter
Parameter Sets: All
Required: False
Position: Named
Accept pipeline input: False
Maximum amount of search results to return. Default and max is 500 search results.
Type: Int
Parameter Sets: Limit
Required: False
Position: Named
Accept pipeline input: False
Search query in Keyword Query Language (KQL) to execute to refine the returned sites. If omitted, all indexed sites will be returned.
Type: String
Parameter Sets: (All)
Required: False
Position: 0
Accept pipeline input: True
Search result item to start returning the results from. Useful for paging. Leave at 0 to return all results.
Type: Int
Parameter Sets: Limit
Required: False
Position: Named
Accept pipeline input: False
Optional connection to be used by cmdlet. Retrieve the value for this parameter by eiter specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead. Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.
Type: WebPipeBind
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False