Forum Discussion
nileshvk
Sep 17, 2017Copper Contributor
Site Collection: Get Web Id fails
Hi Guys, I am using below code to get web Id of list of site collections using code below. The issue is i always get GUID of the first site collection howerver the other webinfo like Title, Url,e...
Sep 19, 2017
Do all you site collection have this problem?
the script below should list all your rootwebs
$cred = Get-Credential -Message "Password" -UserName admin@mytenant.onmicrosoft.com
Connect-PnPOnline https://mytenant.sharepoint.com -Credentials $cred
$sites = Get-PnPTenantSite
foreach ($site in $sites) {
Connect-PnPOnline $site.Url -Credentials $cred
$web = Get-PnPWeb
$web
}nileshvk
Sep 19, 2017Copper Contributor
I can confirm that there are bunch of site collections which has same Web Id. 2 things i want to mention here: 1) we have created these(bulk) site collections using PowerShell
2) We are migrating data from SharePoint 2007 to these site collections.