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
                            if ($site.Url.ToUpper() -ne $onesite.ToUpper()) { 

By Indra

SharePoint Architect

Leave a Reply