Forum Discussion
Site Collection: Get Web Id fails
Get-PnPWeb gets the web within the current site.
You want to use Get-PnPSubWebs to get all subwebs.
then select the one that you want by
Get-PnPSubWebs | where { $_.Title -eq "sitetitle"}
There are 2 properties of site collection. Site Id & Web Id.
I want to find out web id of list of site collections. Above code gives me Title of web(site Collection) but fails for Web ID.
I hope it is clear.
- Sep 18, 2017
Which version of PnP PowerShell are you using. I'm using the September release and Id is coming back without any problem.
- nileshvkSep 18, 2017Copper Contributor
I tried with September release. Still no luck. Are you providing list of site collections to the script?
- nileshvkSep 18, 2017Copper Contributor
I opened 4-5 site collections in SharePoint Online Client Browser and they are showing same Web Id for all the site collections. In the screen shot below I am assuming Level 1 as Site Id and Level 2 as Web Id.