PowerShell : Modifying Web AppPool Account

English

I think you may already know Set-SPServiceApplicationPool. This command can be used to modify apppool account for service application - but it doesn’t work for Web Application. I am looking for Set-SPWebApplicationPool but I can not find it anywhere.

image

So here is the PowerShell script

param([string] $url, [string] $account)

$SPWebApp = Get-SPWebApplication $url

$SPManagedAccount = Get-SPManagedAccount –Identity $account

$SPWebApp.ApplicationPool.ManagedAccount = $SPManagedAccount

$SPWebApp.ApplicationPool.Update()

Avatar
Riwut Libinuko
Sr. Cloud Solution Architect

My research interests include distributed robotics, mobile computing and programmable matter.

comments powered by Disqus

Related