Steps Involved:
- Open SharePoint 2010 Management Shell by going to Start | All Programs | SharePoint | Microsoft SharePoint 2010 Products | SharePoint 2010 Management Shell (Run as Administrator).
- Run the following script.
Powershell Script:
## Get the titles and URLs of all sites directly beneath the current site. $uri="http://serverName:10736/sites/ECT/_vti_bin/Webs.asmx?wsdl" ## Web Service Reference - http://Site/_vti_bin/Webs.asmx $websWebServiceReference = New-WebServiceProxy -Uri $uri -UseDefaultCredential Write-Host -ForegroundColor Magenta "Getting all the sites title and URL................" [System.Xml.XmlNode]$xmlNode=$websWebServiceReference.GetWebCollection() foreach($node in $xmlNode.Web) { $node }
|
Output: