-
Notifications
You must be signed in to change notification settings - Fork 328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Get-PnPTenantSite command does not return any output if the number of sites is greater than 40k #3875
Comments
Did you store the result in a variable like |
We dont store the result in a variable like $result = Get-PnPTenantSite. However we redirect the command output to json like | ConvertTo-Json -Compress -Depth |
Hi @jackpoz We have updated the version to 2.4.0, however we are still facing the same issue. Request you to kindly look into this issue and help us with a solution / workaround here. |
I do remember having no issues in a tenant with 300k site collections but I don't have access to that tenant anymore. |
Yes @jackpoz . From my testing I was able to get 40k Sites after waiting ~ 2 minutes. For organisation with > 40 k sites, I waited beyond 2 minutes (upto 20 minutes) but the command Get-PnPTenantSite never returned anything. |
May i request an update on the bug fix here? |
Hi @jackpoz We have observed that the command Get-PnPTenantSite returns the output even if the number of sites is greater than 40k. This might be likely because this command just returns the names of sharepoint sites. However if we run the command as in Get-PnPTenantSite | ConvertTo-Json -Compress -Depth to get the site attributes, we dont get any output if the organisation has more than 40k sites. Hope this helps us to identify the root cause here. |
Please try this: $sites = Get-PnPTenantSite
$sites.Count If that shows the correct count, then it's not a PnP PowerShell issue. Interestingly enough, it seems ConvertTo-Json has some max size limit inherited from .NET, see https://stackoverflow.com/questions/16854057/convertfrom-json-max-length as old example. |
Thank you @jackpoz . Export-Csv has solved this issue. |
Cannot thank you enough @jackpoz . That answer was super helpful 🙏 🙏 . |
Thank you too, I learnt something new about ConvertTo-Json 👍 |
Reporting an Issue or Missing Feature
Please confirm what it is that your reporting
Get-PnPTenantSite command does not return any output if the number of sites is greater than 40k
Expected behavior
Please describe what output you expect to see from the PnP PowerShell Cmdlets
Get-PnPTenantSite command should return the correct output even if the number of sites is greater than 40k
Actual behavior
Please describe what you see instead. Please provide samples of output or screenshots.
Get-PnPTenantSite command does not return any output if the number of sites is greater than 40k . We waited close to 20 minutes in order to get an output for this command but we did not get any response. We also want to know if there is any fixed interval that we need to wait for a response under Get-PnPTenantSite command while running it for an organisation having greater than 40k Sharepoint Sites.
Steps to reproduce behavior
Please include complete script or code samples in-line or linked from gists
Run Get-PnPTenantSite command for any organisation which has more than 40k Sharepoint sites.
What is the version of the Cmdlet module you are running?
(you can retrieve this by executing
Get-Module -Name "PnP.PowerShell" -ListAvailable
)PS /app> Get-Module -Name "PnP.PowerShell" -ListAvailable
ModuleType Version PreRelease Name PSEdition ExportedCommands
Manifest 2.2.0 PnP.PowerShell Desk {Add-PnPAdaptiveScopeProperty, Add-PnPPropertyBagValue, Add-PnPSiteClassification, Copy-PnPFolder…}
Which operating system/environment are you running PnP PowerShell on?
The text was updated successfully, but these errors were encountered: