Get All Web Applications Per Farm

Get All Web Applications Per Farm

In this post, we’ll list all web applications, service applications and application pools per SharePoint farm.

Get All Web Applications Per Farm

Addiotnaly, we’ll explore the following:

You may also like to check the full “SharePoint Farm Scan Report” PowerShell Script.


Web Applications List Per SharePoint farm

What’s SharePoint Web Application

Simply, It’s an IIS web site with one or multiple content databases that represent the entry point for site collections.

You can create a new web application via central administration as well as via PowerShell.

Get All Web Applications Per Farm

Creating a new web application requires to specify the following:

  • IIS Web Site Name and Port.
  • Security configuration:
    • Allow Anonymous.
    • Use Secure Sockets Layer (SSL).
  • Claims Authentication Types:
    • Windows Authentication.
    • Forms Based Authentication (FBA).
    • Trusted Identity provider.
  • Application Pool.
  • Database Name and Authentication.
  • Service Application Connections.
Creating a Web Application in SharePoint 2019

You may also like to read Extend a Web Application in SharePoint 2016

SharePoint Web Applications Limits and Recommendations

  • The supported limit for the SharePoint web application per farm is 20 web applications.
  • SharePoint Zone limit per web application is 5 zones.
  • SharePoint Application Pool Limits for Web Server on the Farm is 10 Application Pools (This limit depends mainly on the Server Hardware specifications).
  • It’s recommended to create host-named site collections instead of creating multiple web applications.

You may also like to read SharePoint 2019 Limitations.


Get All Web Applications Per Farm

In SharePoint, you can get the list of web applications per farm using central administration as well as PowerShell.

Get Web Applications Per Farm Using Central Administration

  • Open Central Administration, Below “Application Management”, Click on “Manage Web Applications”.
Get All Web Applications Per Farm
  • Here, you can find the list of web applications and its URL and the assigned ports.
Web application list per farm in SharePoint

Get Web Applications Per Farm Using PowerShell

You can also get the full list of web application per farm using PowerShell as the following:

  • Open SharePoint Management Shell as Administrator.
Open SharePoint 2016 PowerShell - Upgrade and Migrate to Project Server 2016
  • Run the below cmdlet
Get-SPWebApplication

Below is the result of running “Get-SPWebApplication” to get the web applications list per farm.

Web application list per farm in SharePoint using PowerShell

How many web applications per SharePoint farm?

In central administration, you can’t get the count of web application per farm, you can only count it manually.

Using PowerShell, you can easily get How many web application per SharePoint farm as the following:

  • Open SharePoint Management Shell as Administrator.
Open SharePoint 2016 PowerShell - Upgrade and Migrate to Project Server 2016
  • Run the below cmdlet
$WebAppsCount = (Get-SPWebApplication).count
Write-Host "the number of web applications per farm" $WebAppsCount -ForegroundColor Green
get the count of web application per farm in SharePoint

As we earlier mentioned, the supported limit for SharePoint Web Application per farm is 20 Web Applications.


Application Pools List Per SharePoint farm

What’s SharePoint Application Pool?

Simply, It’s a grouping of URLs that share one or more worker processes.

The application pool can be shared with one or more web applications, it also provides security and performance isolation among different applications.

Get SharePoint Application Pools per farm

SharePoint Application Pool Limits and Recommendations

You may also like to read SharePoint 2019: Service Accounts Recommendations

Get Application Pools Per Farm Using PowerShell

SharePoint web application and service application can use an existing application pool or you can create a new one.

Here, you can get the list of SharePoint web application pools as well as the list of SharePoint service application pools.

  • Open SharePoint Management Shell as Administrator.
Open SharePoint 2016 PowerShell - Upgrade and Migrate to Project Server 2016
  • Run the below cmdlet
#SharePoint Web Application Pool
$SPWebAppPool = Get-SPWebApplication | select ApplicationPool -Unique
$SPWebAppPool
#SharePoint Service Application Pool
$SPSrvWebAppPool = Get-SPServiceApplicationPool  | Select -Unique
$SPSrvWebAppPool

As we earlier mentioned, it’s strongly recommended to minimize the number of application pools per web server as far as possible.


How many application pools per SharePoint farm?

As we earlier mentioned, the threshold limit of SharePoint Application Pool Limits for Web Server on the Farm is 10 application pools.

In this section, we’ll learn how to get the SharePoint application pools counts per farm using PowerShell.

  • Open SharePoint Management Shell as Administrator.
Open SharePoint 2016 PowerShell - Upgrade and Migrate to Project Server 2016
  • Run the below cmdlet
#SharePoint Web Application Pool
$SPWebAppPool = Get-SPWebApplication | select ApplicationPool -Unique
#SharePoint Service Application Pool
$SPSrvWebAppPool = Get-SPServiceApplicationPool  | Select -Unique
$SPAppPoolCount = $SPSrvWebAppPool.count + $SPWebAppPool.count
Write-Host "Total Number of SharePoint Application Pool:" $SPAppPoolCount
How many application pools per SharePoint farm

You may also like to read how to Get the corresponding SharePoint services name of an Application Pool Guid.


Web Application Vs Content Database Vs Site Collection Vs SubSites

  • Each web application can hold multiple Content Databases.
  • Each web application can hold multiple Site Collections.
  • Each Content Database can hold multiple Site Collections.
  • Site Collection can be only stored in one Content Database.
  • You can’t create a site collection without having a web application with a content database.
  • Each Site Collection can hold multiple SubSites.
  • Each SubSite can also hold additional SubSites.
  • You can’t create a subsite without having a top-level site collection.

You may also like to read


PowerShell Script to get all web applications, service applications and application pools per SharePoint farm

In this section, we’ll introduce a simple PowerShell script that helps you to get the following:

  • The list of all SharePoint web applications per farm.
  • The list of all SharePoint web application pools per web server.
  • The list of all SharePoint service application pools.
  • The list of running SharePoint service applications per farm.
  • A warning alert if the number of web applications is exceeded the supported limit.
  • A warning alert if the number of application pools is exceeded the threshold limit.
PowerShell Script to get all web applications and application pools per SharePoint farm

Download the “all web applications and application pools per SharePoint farm” script on GitHub.


SharePoint Farm Scan Report

SharePoint Farm Scan Report is a PowerShell Script that helps you to monitor the SharePoint farm limits and getting statistics about your farm like the following:

  1. List of SharePoint web applications per farm.
  2. The number of SharePoint web applications per farm.
  3. List of SharePoint Application Pools.
  4. The number of SharePoint application pools.
  5. List of running SharePoint service applications per farm.
  6. The number of running SharePoint service applications per farm.
  7. List of SharePoint content databases per farm.
  8. The number of SharePoint content databases per farm.
  9. List of SharePoint content databases per web application.
  10. The number of SharePoint content databases per web application.
  11. What’s the current content database size?
  12. List of SharePoint site collections per farm
  13. The number of SharePoint site collections per farm.
  14. List of SharePoint site collections per web application
  15. The number of SharePoint site collections per web application.
  16. List of SharePoint site collections per content database.
  17. The number of site collections per content database.
  18. Which content database stores the site collection?
  19. What’s the Site collection size?
  20. List of SharePoint SubSites Per farm.
  21. The number of SharePoint SubSites per farm.
  22. List of SharePoint SubSites per site collection.
  23. Total number of SubSites per site collection.
  24. Farm Report Summary.
SharePoint Farm Scan Report

Download the “SharePoint Farm Scan Report” full script on GitHub.


Applies to
  • SharePoint 2019.
  • SharePoint 2016.
  • SharePoint 2013 / SharePoint 2010.
Download
Conclusion

In conclusion, we have provided a PowerShell script to list all web applications, service application and application pools per SharePoint farm.

Additionally, we have also explored the following:

You may also like to read
Have a Question?

If you have any related questions, please don’t hesitate to Ask it at deBUG.to Community.

2 thoughts on “Get All Web Applications Per Farm”

  1. Pingback: PowerShell Script: SharePoint Farm Scan Report | SPGeeks

  2. Pingback: Get All Content Databases Per Farm | SPGeeks

Leave a Reply