Home
%3CLINGO-SUB%20id%3D%22lingo-sub-328619%22%20slang%3D%22en-US%22%3EFun%20with%20SharePoint%20Service%20Application%20Pools!%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-328619%22%20slang%3D%22en-US%22%3E%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-size%3A%2018pt%3B%22%3E%3CSTRONG%20style%3D%22box-sizing%3A%20border-box%3B%20font-weight%3A%20bold%3B%22%3ESummary%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3EThe%20blog%20referenced%20in%20the%20resource%20section%20below%20does%20a%20great%20job%20at%20demonstrating%20how%20to%20create%20a%20new%20SharePoint%20Web%20Application%20Pool%20and%20associate%20it%20with%20the%20Web%20App%20using%20PowerShell.%20However%2C%20as%20mentioned%20in%20the%20blog%20the%20process%20is%20a%20little%20different%20for%20Service%20Applications.%20The%20following%20information%20is%20just%20a%20quick%20demonstration%20on%20how%20to%20create%20a%20new%20service%20application%20app%20pool%2C%20and%20re-associate%20the%20existing%20service%20app%20to%20the%20new%20pool%2C%20then%20delete%20the%20old%20pool.%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-size%3A%2018pt%3B%22%3E%3CSTRONG%20style%3D%22box-sizing%3A%20border-box%3B%20font-weight%3A%20bold%3B%22%3EThe%20Fun%20Stuff%3A%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CPRE%20style%3D%22background-attachment%3A%20scroll%3B%20background-clip%3A%20border-box%3B%20background-color%3A%20white%3B%20background-image%3A%20none%3B%20background-origin%3A%20padding-box%3B%20background-position-x%3A%200%25%3B%20background-position-y%3A%200%25%3B%20background-repeat%3A%20repeat%3B%20background-size%3A%20auto%3B%20border-bottom-left-radius%3A%204px%3B%20border-bottom-right-radius%3A%204px%3B%20border-image-outset%3A%200%3B%20border-image-repeat%3A%20stretch%3B%20border-image-slice%3A%20100%25%3B%20border-image-source%3A%20none%3B%20border-image-width%3A%201%3B%20border-top-left-radius%3A%204px%3B%20border-top-right-radius%3A%204px%3B%20box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20display%3A%20block%3B%20font-family%3A%20Menlo%2CMonaco%2CConsolas%2C%26amp%3Bquot%3B%20courier%20new%26amp%3Bquot%3B%2Cmonospace%3B%20font-size%3A%2013px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.4285%3B%20orphans%3A%202%3B%20overflow%3A%20auto%3B%20overflow-wrap%3A%20break-word%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20pre%3B%20word-break%3A%20break-all%3B%20word-spacing%3A%200px%3B%20padding%3A%209.5px%3B%20margin%3A%200px%200px%2010px%200px%3B%20border%3A%201px%20solid%20%23cccccc%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20Lucida%20Console%3B%20font-size%3A%209pt%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkgreen%3B%22%3E%23%20The%20following%20commands%20are%20available%20when%20working%20with%20SharePoint%20Service%20Application%20Pools.%3C%2FSPAN%3E%0A%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20Lucida%20Console%3B%20font-size%3A%209pt%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkgreen%3B%22%3E%23%20New-SPServiceApplicationPool%0A%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20Lucida%20Console%3B%20font-size%3A%209pt%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkgreen%3B%22%3E%23%20Get-SPServiceApplicationPool%20%3C%2FSPAN%3E%0A%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20Lucida%20Console%3B%20font-size%3A%209pt%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkgreen%3B%22%3E%23%20Set-SPServiceApplicationPool%3C%2FSPAN%3E%0A%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20Lucida%20Console%3B%20font-size%3A%209pt%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkgreen%3B%22%3E%23%20Remove-SPServiceApplicationPool%3C%2FSPAN%3E%0A%0A%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20Lucida%20Console%3B%20font-size%3A%209pt%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkgreen%3B%22%3E%23%20Check%20to%20ensure%20Microsoft.SharePoint.PowerShell%20is%20loaded%20%3C%2FSPAN%3E%20%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20Lucida%20Console%3B%20font-size%3A%209pt%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20orangered%3B%22%3E%24snapin%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkgray%3B%22%3E%3D%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20blue%3B%22%3EGet-PSSnapin%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkgray%3B%22%3E%7C%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20blue%3B%22%3EWhere-Object%3C%2FSPAN%3E%20%7B%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20orangered%3B%22%3E%24_%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkgray%3B%22%3E.%3C%2FSPAN%3EName%20%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkgray%3B%22%3E-eq%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkred%3B%22%3E'Microsoft.SharePoint.Powershell'%3C%2FSPAN%3E%7D%0A%20%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20Lucida%20Console%3B%20font-size%3A%209pt%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkblue%3B%22%3Eif%3C%2FSPAN%3E%20(%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20orangered%3B%22%3E%24snapin%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkgray%3B%22%3E-eq%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20orangered%3B%22%3E%24null%3C%2FSPAN%3E)%20%7B%0A%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20Lucida%20Console%3B%20font-size%3A%209pt%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20blue%3B%22%3EWrite-Host%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkred%3B%22%3E%22Loading%20SharePoint%20Powershell%20Snapin%22%3C%2FSPAN%3E%0A%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20Lucida%20Console%3B%20font-size%3A%209pt%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20blue%3B%22%3EAdd-PSSnapin%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20blueviolet%3B%22%3EMicrosoft.SharePoint.Powershell%3C%2FSPAN%3E%0A%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20Lucida%20Console%3B%20font-size%3A%209pt%3B%22%3E%7D%0A%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20Lucida%20Console%3B%20font-size%3A%209pt%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkgreen%3B%22%3E%23Get%20the%20Service%20App%20you%20are%20working%20with%20and%20store%20it%20in%20a%20variable.%20%3C%2FSPAN%3E%0A%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20Lucida%20Console%3B%20font-size%3A%209pt%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20blue%3B%22%3EGet-SPServiceApplication%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkgray%3B%22%3E%7C%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20blue%3B%22%3EFL%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20blueviolet%3B%22%3EDisplayName%0A%3C%2FSPAN%3E%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20Lucida%20Console%3B%20font-size%3A%209pt%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkgreen%3B%22%3E%23Pick%20which%20Service%20App%20you%20wish%20to%20modify%20from%20the%20list%20generated%20above%0A%3C%2FSPAN%3E%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20Lucida%20Console%3B%20font-size%3A%209pt%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkgreen%3B%22%3E%23Add%20the%20display%20name%20to%20the%20%7B%24_.Name%20-eq%20%22%20%22%7D%20below%3C%2FSPAN%3E%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20Lucida%20Console%3B%20font-size%3A%209pt%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20orangered%3B%22%3E%24spsvcapp%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkgray%3B%22%3E%3D%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20blue%3B%22%3EGet-SPServiceApplication%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkgray%3B%22%3E%7C%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20blue%3B%22%3Ewhere%3C%2FSPAN%3E%20%7B%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20orangered%3B%22%3E%24_%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkgray%3B%22%3E.%3C%2FSPAN%3EName%20%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkgray%3B%22%3E-eq%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkred%3B%22%3E%22BDC%20Service%20APP%22%3C%2FSPAN%3E%7D%0A%3C%2FSPAN%3E%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20Lucida%20Console%3B%20font-size%3A%209pt%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkgreen%3B%22%3E%23run%20%24spsvcapp%20alone%20to%20ensure%20you%20have%20bound%20to%20the%20correct%20application.%3C%2FSPAN%3E%0A%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20Lucida%20Console%3B%20font-size%3A%209pt%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20orangered%3B%22%3E%24spsvcapp%3C%2FSPAN%3E%0A%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20Lucida%20Console%3B%20font-size%3A%209pt%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkgreen%3B%22%3E%23%20Note%3A%20%3C%2FSPAN%3E%0A%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20Lucida%20Console%3B%20font-size%3A%209pt%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkgreen%3B%22%3E%23%20For%20the%20next%20command%2C%20the%20%22-account%22%20used%20below%20should%20be%20Managed%20account%20in%20SharePoint.%20%3C%2FSPAN%3E%0A%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20Lucida%20Console%3B%20font-size%3A%209pt%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkgreen%3B%22%3E%23%20Before%20to%20executing%20the%20script%20use%20%22New-SPManagedAccount%22%20if%20a%20new%20account%20will%20be%20created.%0A%3C%2FSPAN%3E%20%0A%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20Lucida%20Console%3B%20font-size%3A%209pt%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkgreen%3B%22%3E%23%20Example%3A%0A%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20Lucida%20Console%3B%20font-size%3A%209pt%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkgreen%3B%22%3E%23%20%24cred%20%3D%20Get-Credential%0A%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20Lucida%20Console%3B%20font-size%3A%209pt%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkgreen%3B%22%3E%23%20New-SPManagedAccount%20-Credential%20%24cred%0A%3C%2FSPAN%3E%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20Lucida%20Console%3B%20font-size%3A%209pt%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkgreen%3B%22%3E%23Time%20to%20create%20to%20new%20App%20Pool%3C%2FSPAN%3E%0A%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20Lucida%20Console%3B%20font-size%3A%209pt%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20orangered%3B%22%3E%24newpool%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkgray%3B%22%3E%3D%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20blue%3B%22%3ENew-SPServiceApplicationPool%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20navy%3B%22%3E-Name%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkred%3B%22%3E%22New_BDC_AppPool%22%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20navy%3B%22%3E-Account%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkred%3B%22%3E%22mylab%5Cspservice%22%3C%2FSPAN%3E%0A%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20Lucida%20Console%3B%20font-size%3A%209pt%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkgreen%3B%22%3E%23Store%20the%20old%20App%20Pool%20in%20a%20variable.%3C%2FSPAN%3E%0A%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20Lucida%20Console%3B%20font-size%3A%209pt%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20orangered%3B%22%3E%24oldapppool%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkgray%3B%22%3E%3D%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20orangered%3B%22%3E%24spsvcapp%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkgray%3B%22%3E.%3C%2FSPAN%3EApplicationPool%0A%3C%2FSPAN%3E%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20Lucida%20Console%3B%20font-size%3A%209pt%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkgreen%3B%22%3E%23Did%20it%20store%20properly%3F%3C%2FSPAN%3E%0A%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20Lucida%20Console%3B%20font-size%3A%209pt%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20orangered%3B%22%3E%24oldapppool%3C%2FSPAN%3E%0A%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20Lucida%20Console%3B%20font-size%3A%209pt%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkgreen%3B%22%3E%23Now%20associate%20the%20new%20app%20pool%20to%20the%20exiting%20service%20app.%3C%2FSPAN%3E%0A%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20Lucida%20Console%3B%20font-size%3A%209pt%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20orangered%3B%22%3E%24spsvcapp%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkgray%3B%22%3E.%3C%2FSPAN%3EApplicationPool%20%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkgray%3B%22%3E%3D%3C%2FSPAN%3E%20%24newpool%3C%2FSPAN%3E%0A%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20orangered%3B%20font-family%3A%20Lucida%20Console%3B%20font-size%3A%209pt%3B%22%3E%24spsvcapp%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkgray%3B%22%3E.%3C%2FSPAN%3EUpdate()%0A%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20Lucida%20Console%3B%20font-size%3A%209pt%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20darkgreen%3B%22%3E%23Removing%20the%20old%20App%20Pool%20if%20necessary.%3C%2FSPAN%3E%0A%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20Lucida%20Console%3B%20font-size%3A%209pt%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20blue%3B%22%3ERemove-SPServiceApplicationPool%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20orangered%3B%22%3E%24oldapppool%0A%20%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FPRE%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-size%3A%2018pt%3B%22%3E%3CSTRONG%20style%3D%22box-sizing%3A%20border-box%3B%20font-weight%3A%20bold%3B%22%3EResources%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3ECreate%20a%20SharePoint%20Application%20Pool%20using%20PowerShell%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%3CA%20style%3D%22background-color%3A%20transparent%3B%20box-sizing%3A%20border-box%3B%20color%3A%20%23337ab7%3B%20text-decoration%3A%20none%3B%22%20href%3D%22https%3A%2F%2Fblogs.technet.microsoft.com%2Ffromthefield%2F2014%2F03%2F26%2Fcreate-a-sharepoint-application-pool-using-powershell%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fblogs.technet.microsoft.com%2Ffromthefield%2F2014%2F03%2F26%2Fcreate-a-sharepoint-application-pool-using-powershell%3C%2FA%3E%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3ENew-SPManagedAccount%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%3CA%20style%3D%22background-color%3A%20transparent%3B%20box-sizing%3A%20border-box%3B%20color%3A%20%23337ab7%3B%20text-decoration%3A%20none%3B%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Fsharepoint-server%2Fnew-spmanagedaccount%3Fview%3Dsharepoint-ps%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Fsharepoint-server%2Fnew-spmanagedaccount%3Fview%3Dsharepoint-ps%3C%2FA%3E%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3EGet-SPServiceApplicationPool%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%3CA%20style%3D%22background-color%3A%20transparent%3B%20box-sizing%3A%20border-box%3B%20color%3A%20%23337ab7%3B%20text-decoration%3A%20none%3B%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Fsharepoint-server%2Fget-spserviceapplicationpool%3Fview%3Dsharepoint-ps%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Fsharepoint-server%2Fget-spserviceapplicationpool%3Fview%3Dsharepoint-ps%3C%2FA%3E%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3ENew-SPServiceApplicationPool%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%3CA%20style%3D%22background-color%3A%20transparent%3B%20box-sizing%3A%20border-box%3B%20color%3A%20%23337ab7%3B%20text-decoration%3A%20none%3B%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Fsharepoint-server%2Fnew-spserviceapplicationpool%3Fview%3Dsharepoint-ps%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Fsharepoint-server%2Fnew-spserviceapplicationpool%3Fview%3Dsharepoint-ps%3C%2FA%3E%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%2Ctahoma%2Carial%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%200px%2010px%200px%3B%22%3ERemove-SPService%E2%80%8BApplication%E2%80%8BPool%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3E%3CA%20style%3D%22background-color%3A%20transparent%3B%20box-sizing%3A%20border-box%3B%20color%3A%20%23337ab7%3B%20text-decoration%3A%20none%3B%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Fsharepoint-server%2Fremove-spserviceapplicationpool%3Fview%3Dsharepoint-ps%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Fsharepoint-server%2Fremove-spserviceapplicationpool%3Fview%3Dsharepoint-ps%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-328619%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESharePoint%20On-Prem%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Support%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E

Summary

 

The blog referenced in the resource section below does a great job at demonstrating how to create a new SharePoint Web Application Pool and associate it with the Web App using PowerShell. However, as mentioned in the blog the process is a little different for Service Applications. The following information is just a quick demonstration on how to create a new service application app pool, and re-associate the existing service app to the new pool, then delete the old pool.

 

The Fun Stuff:

# The following commands are available when working with SharePoint Service Application Pools.
# New-SPServiceApplicationPool
# Get-SPServiceApplicationPool 
# Set-SPServiceApplicationPool
# Remove-SPServiceApplicationPool

# Check to ensure Microsoft.SharePoint.PowerShell is loaded  
$snapin = Get-PSSnapin | Where-Object {$_.Name -eq 'Microsoft.SharePoint.Powershell'}
 if ($snapin -eq $null) {
 Write-Host "Loading SharePoint Powershell Snapin"
 Add-PSSnapin Microsoft.SharePoint.Powershell
 }

#Get the Service App you are working with and store it in a variable. 
Get-SPServiceApplication | FL DisplayName

#Pick which Service App you wish to modify from the list generated above

#Add the display name to the {$_.Name -eq " "} below
$spsvcapp = Get-SPServiceApplication | where {$_.Name -eq "BDC Service APP"}

#run $spsvcapp alone to ensure you have bound to the correct application.
$spsvcapp

# Note: 
# For the next command, the "-account" used below should be Managed account in SharePoint. 
# Before to executing the script use "New-SPManagedAccount" if a new account will be created.
 
# Example:
# $cred = Get-Credential
# New-SPManagedAccount -Credential $cred

#Time to create to new App Pool
$newpool = New-SPServiceApplicationPool -Name "New_BDC_AppPool" -Account "mylab\spservice"

#Store the old App Pool in a variable.
$oldapppool = $spsvcapp.ApplicationPool

#Did it store properly?
$oldapppool

#Now associate the new app pool to the exiting service app.
$spsvcapp.ApplicationPool = $newpool
$spsvcapp.Update()

#Removing the old App Pool if necessary.
Remove-SPServiceApplicationPool $oldapppool
 

 

Resources

Create a SharePoint Application Pool using PowerShell
https://blogs.technet.microsoft.com/fromthefield/2014/03/26/create-a-sharepoint-application-pool-usi...

 

New-SPManagedAccount
https://docs.microsoft.com/en-us/powershell/module/sharepoint-server/new-spmanagedaccount?view=share...

 

Get-SPServiceApplicationPool
https://docs.microsoft.com/en-us/powershell/module/sharepoint-server/get-spserviceapplicationpool?vi...

 

New-SPServiceApplicationPool
https://docs.microsoft.com/en-us/powershell/module/sharepoint-server/new-spserviceapplicationpool?vi...

 

Remove-SPService​Application​Pool
https://docs.microsoft.com/en-us/powershell/module/sharepoint-server/remove-spserviceapplicationpool...