Skip to content

spo hubsite get

Gets information about the specified hub site

Usage

m365 spo hubsite get [options]

Options

-i, --id [id]
ID of the hubsite. Specify either id, title or url but not multiple.
-t, --title [title]
Title of the hubsite. Specify either id, title or url but not multiple.
-u, --url [url]
URL of the hubsite. Specify either id, title or url but not multiple.
--includeAssociatedSites
Include the associated sites in the result (only in JSON output)
-h, --help
output usage information
--query [query]
JMESPath query string. See http://jmespath.org/ for more information and examples
-o, --output [output]
Output type. json,text,csv. Default json
--verbose
Runs command with verbose logging
--debug
Runs command with debug logging

Examples

Get information about the hub site with ID 2c1ba4c4-cd9b-4417-832f-92a34bc34b2a

m365 spo hubsite get --id 2c1ba4c4-cd9b-4417-832f-92a34bc34b2a

Get information about the hub site with Title My Hub Site

m365 spo hubsite get --title 'My Hub Site'

Get information about the hub site with URL https://contoso.sharepoint.com/sites/HubSite

m365 spo hubsite get --url 'https://contoso.sharepoint.com/sites/HubSite'

Get information about the hub site with ID 2c1ba4c4-cd9b-4417-832f-92a34bc34b2a, including its associated sites. Associated site info is only shown in JSON output.

m365 spo hubsite get --id 2c1ba4c4-cd9b-4417-832f-92a34bc34b2a --includeAssociatedSites --output json

Get information about the hub site with Title My Hub Site

m365 spo hubsite get --title "My Hub Site"

Get information about the hub site with URL https://contoso.sharepoint.com/sites/HubSite

m365 spo hubsite get --url "https://contoso.sharepoint.com/sites/HubSite"

More information