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 18, 2017
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"}
- nileshvkSep 18, 2017Copper Contributor
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?