foreach($webapp in Get-SPWebApplication) {
foreach ($site in $webApp.Sites) {
Write-Host processing $site.Url
#if onesite parameter is present
if (($onesite -ne $null) -and ($onesite -ne “”))
{
#check does this is the only one selected web for processing
By Indra
SharePoint Architect