Use powershell to get the SharePoint application pool

Source: Internet
Author: User

Run the get-spserviceapplicationpool command to obtain the application pool used by services.

Example:

PS c: \ Users \ administrator. VSAT> $ svcpools = Get-spserviceapplicationpool
PS c: \ Users \ administrator. VSAT> $ pool1 = $ svcpools |? {$ _. Name-EQ "SharePoint Services app pool "}
PS c: \ Users \ administrator. VSAT> $ pool1

Name processaccountname
----------------------
SharePoint Services app pool VSAT \ Administrator

 

Note: The following describes how to use the foreach method to obtain a specified application pool. The foreach command is obviously not easy to write as pipeline.

PS c: \ Users \ administrator. VSAT> foreach ($ svcpool in $ svcpools) {if ($ svcpool. name-EQ "SharePoint Services app pool") {$ pool2 = $ svcpool }}
PS c: \ Users \ administrator. VSAT> $ pool2

Name processaccountname
----------------------
SharePoint Services app pool VSAT \ Administrator

Run the following command to obtain the application pool used by all web applications:

PS c: \ Users \ administrator. VSAT> $ pools = [microsoft. Sharepoint. Administration. spwebservice]: contentservice. applicationpools
PS c: \ Users \ administrator. VSAT> $ pool3 = $ pools | where {$ _. Name-EQ "SharePoint hosting pool "}

Note: The app pool used by Sharepoint Services does not display the name in IIS, And the guid corresponding to it is displayed.

The following command can help you map the ID and name.

PS c: \ Users \ administrator. VSAT> $ svcpools = Get-spserviceapplicationpool

PS c: \ Users \ administrator. VSAT> foreach ($ svcpool in $ svcpools) {$ svcpool. Id. tostring () + "" + $ svcpool. name}
0ac86057-a06f-4406-b388-62540d6a4769 fastsearchadminserviceapppool
C334555a-9e7b-469d-bdee-a4a40e831015 fastsearchqueryandsettingsapppool
69693b39-2a7e-4931-b1bc-3e20bd2e3c3b securitytokenserviceapplicationpool
9c03d8ea-0fa5-4850-9b76-b4e1018350ca SharePoint Services app pool
881b143d-cea5-4d2c-a319-ddb2ebf19de4 SharePoint Web Services System
PS c: \ Users \ administrator. VSAT>

 

 

References

========================

Automating Microsoft SharePoint 2010 with Windows powershell 2.0 (Book excerpt)

Http://technet.microsoft.com/en-us/library/hh393957.aspx

Get-spserviceapplicationpool

Http://technet.microsoft.com/en-us/library/ff607544.aspx

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.