Had a nice quite evening planned, and then someone sends me in search of a wild goose...
Because of a security issue they could not use my little GUID getter tool on their site and they were looking for some other way of getting a site GUID.
The wild goose hunt paid off as I found two…
For those who have bought my book, you may want add a note on page 307 to see this article.
1) Wiki home page:
Works for SP 2010 only: Display a Team Site home page (a wiki home page, home.aspx) that has at least one list web part, view the source of the page (right-view source) and search for "RelatedWebId" (you could temporarily add an Announcements or library web part to the page)
2) Tree View:
Works for both SP 2007 and SP 2010: Go to Site Actions, Site Settings, Tree View and enable Tree View. Then go to any page, view source and search for "ListNode:"
Here's one for the PowerShell users that requires admin access to the servers:
Open "SharePoint 2010 Management Shell" (PowerShell for SharePoint)
$site = Get-SPSite http://yourserver/sites/yoursitename
$web = $site.AllWebs["yoursubsitename"] or $site.RootWeb for the root site
I guess the wild goose chase at least got me another blog article. :-)