How can you change an IIS Site’s App Pool with the Powershell Web Admin Commandlets

ApplicationPool is a property on the web site in the IIS: drive. Set it like so:

#site level
Set-ItemProperty 'IIS:\Sites\Default Web Site' applicationPool ProjectAppPool

#app level
Set-ItemProperty 'IIS:\Sites\Default Web Site\AppName' applicationPool ProjectAppPool

If you have the PowerShell Community Extensions installed, you can use the Show-Tree command to explore these drives e.g.:

Show-Tree IIS:\Sites -ShowProperty -Depth 1

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)