Power Shell Script to 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
   
 }


Comments

Popular posts from this blog

Activating a SharePoint Feature on Multiple Sites or Site Collections using PowerShell

Managed Path with WildCard and Explicit Inclusion

List All SharePoint 2010 PowerShell Commands