{"id":3927,"date":"2013-05-18T20:59:12","date_gmt":"2013-05-19T04:59:12","guid":{"rendered":"https:\/\/www.zubairalexander.com\/stage\/?p=3927"},"modified":"2013-05-18T23:50:30","modified_gmt":"2013-05-19T07:50:30","slug":"using-powershell-to-create-a-sharepoint-service-application-pool","status":"publish","type":"post","link":"https:\/\/www.zubairalexander.com\/blog\/using-powershell-to-create-a-sharepoint-service-application-pool\/","title":{"rendered":"Using PowerShell to Create a SharePoint Service Application Pool"},"content":{"rendered":"<p>There are situations where creating a service application pool in SharePoint Server 2013 using PowerShell comes handy. Well, you can also use the same command for SharePoint Server 2010. Here&#8217;s the command.<\/p>\n<p><strong>New-SPServiceApplicationPool -Name <span style=\"color: #0000ff;\">&#8220;SITPUG Search Service Application Pool&#8221;<\/span> -Account <span style=\"color: #0000ff;\">SITPUG\\SP_Search<\/span><\/strong><\/p>\n<p>Where &#8220;SITPUG Search Service Application Pool&#8221; is the name of the application pool that you want to create. I used quotes because there are spaces in the name. SITPUG is the name of the domain and SITPUG\\SP_Search is the service account in the SITPUG domain that will be used by the application pool. The result will be something similar to this:<\/p>\n<blockquote><p>Name\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0 \u00a0 \u00a0\u00a0 \u00a0\u00a0 ProcessAccountName<br \/>\n&#8212;&#8212;- \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0 &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\nSITPUG Search Service Application&#8230; SITPUG\\SP_Search<\/p>\n<p>PS C:\\Windows\\system32&gt;<\/p><\/blockquote>\n<p>To view all the existing application pools you can use the following command.<\/p>\n<p><strong>Get-SPServiceApplicationPool | select Id, Name<\/strong><\/p>\n<p>You will notice that the left column lists the Ids and the right column lists the names.<strong> <\/strong>Here\u2019s an example.<strong><br \/>\n<\/strong><\/p>\n<blockquote><p>PS C:\\Users\\SP_Admin&gt; Get-SPServiceApplicationPool | select Id, Name<\/p>\n<p>Id\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Name<br \/>\n&#8212; \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 -\u2014&#8212;&#8211;<br \/>\n4a3524ac-fc36-4b76-ab66-e8b4abca1cfc1\u00a0 \u00a0 \u00a0 SITPUG Search Service Application Pool<br \/>\n447ba2a3-b5a3-5234-3c34-b47ef6ba5dc4\u00a0 \u00a0\u00a0 SecurityTokenServiceApplicationPool<br \/>\ncba42cbe-bb43-3525-8457-ae24846b90c4\u00a0\u00a0\u00a0 SharePoint Web Services System<\/p><\/blockquote>\n<p>To delete the orphaned application pool type:<\/p>\n<h4><strong>Remove-SPServiceApplicationPool -Identity &#8220;Name of Orphaned Application Pool&#8221;<\/strong><\/h4>\n<p>What\u2019s confusing here is that even though the command uses the switch  called Identity, you don\u2019t want to use the \u201cId\u201d, you want to use the  name of the application pool in the above command. For example, if the  SeattlePro Search Service was the orphaned application pool that is  available for you to use in SharePoint but you don\u2019t see it in IIS 7,  you will use the following command to delete it.<\/p>\n<h4><strong>Remove-SPServiceApplicationPool -Identity &#8220;SeattlePro Search Service<\/strong>&#8220;<\/h4>\n<p>This should get rid of the orphaned application pool and you can recreate the pool by using the old name if you want.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are situations where creating a service application pool in SharePoint Server 2013 using PowerShell comes handy. Well, you can also use the same command for SharePoint Server 2010. Here&#8217;s the command. New-SPServiceApplicationPool -Name &#8220;SITPUG Search Service Application Pool&#8221; -Account SITPUG\\SP_Search Where &#8220;SITPUG Search Service Application Pool&#8221; is the name of the application pool that [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[54,11],"tags":[],"class_list":["post-3927","post","type-post","status-publish","format-standard","hentry","category-sharepoint","category-tips-tricks"],"aioseo_notices":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.zubairalexander.com\/blog\/wp-json\/wp\/v2\/posts\/3927","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zubairalexander.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zubairalexander.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zubairalexander.com\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zubairalexander.com\/blog\/wp-json\/wp\/v2\/comments?post=3927"}],"version-history":[{"count":0,"href":"https:\/\/www.zubairalexander.com\/blog\/wp-json\/wp\/v2\/posts\/3927\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.zubairalexander.com\/blog\/wp-json\/wp\/v2\/media?parent=3927"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zubairalexander.com\/blog\/wp-json\/wp\/v2\/categories?post=3927"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zubairalexander.com\/blog\/wp-json\/wp\/v2\/tags?post=3927"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}