Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Below are the scripts that can help you retrivesharepoint GUIDs which at times are very handy.
Lets start with Sharepoint 2010
$site = Get-SPSite http://yourserver/sites/yoursite
$web = $site.OpenWeb("yoursubsite")
write-host "Site: " + $site.idwrite-host "Web: " + $web.id
$web.lists Format-Table title,id -AutoSize$web.Dispose()
$site.Dispose()
Quick Trick Note: You could change $site.OpenWeb("yoursubsite") to $site.RootWeb to get just the top site.
Now lets take SharePoint 2007
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
$site = New-Object Microsoft.SharePoint.SPSite("http://yourserver/sites/yoursite")
$web = $site.OpenWeb("yoursubsite")
write-host "Site: " + $site.idwrite-host "Web: " + $web.id
$web.lists Format-Table title,id -AutoSize
$web.Dispose()
$site.Dispose()
Hope this helps