Thursday, August 22, 2013

sharepoint powershell get all web applications

function GetAllWebApplications()
{
 
  write-host "Sitecollection List Extraction started...." -foregroundcolor yellow
  $contentWebAppServices = (Get-SPFarm).services |
  ? {$_.typename -eq "Microsoft SharePoint Foundation Web Application"}

  foreach($webApp in $contentWebAppServices.WebApplications)
  {
  Write-Host "Web Application : " $webApp.name
 
 } 

No comments:

Post a Comment