pnp / PnP-PowerShell

SharePoint PnP PowerShell CmdLets

Home Page:https://pnp.github.io/powershell

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[FEATURE] Add site Id to output of Get-PnPTenantSite

alexbelevantsev opened this issue · comments

Is your feature request related to a problem? Please describe.
Get-PnPTenantSite doesn't return site Id.

Describe the solution you'd like
Get-PnPTenantSite returns a site Id.

Describe alternatives you've considered
Currently we use the following cmdlets to get the site Id:

Connect-PnPOnline -Url $tenant_site_url -Credentials $cred
$sites=Get-PnPTenantSite -Detailed
foreach($tenant_site in $sites){
    Connect-PnPOnline -Url $tenant_site.Url -Credentials $cred
    $site = Get-PnPSite -Includes ID
}

Unfortunately additional cmdlets takes much time to execute.

If I'm reading the code and the docs right (and there's a really good chance I'm not) then the Site's ID isn't returned by the GetSiteProperties method they're using. It returns a SiteProperties object and I don't see Site ID in there. All of that properties of that object are being returned by Get-PnPTenantSite.
I'm not saying that can't add it, I'm just noting that it will be more work than just including a property they're already getting back.