IIS 7 and Above
Set Website App Pool
Last post Oct 14, 2009 07:49 PM by t-angrui
Oct 14, 2009 06:25 PM|t-angrui|LINK
I want to be able to set my websites app pool through powwershell. Right now they're all set to DefaultAppPool. As the picture below shows I want to able to assign the FileCopyService app pool to the FileCopyService website.
Any ideas on how to script this in Powershell Modules ? I don't know if this will be much help but I create the App pool and set the physical path with the following :
New-Item -force $FileCopyService_WebAppPath -physicalPath($webServerSetting.WorkingFolderPath + "\FileCopyService") -type Application
Oct 14, 2009 07:49 PM|t-angrui|LINK
Hey guys went through my code and remember I had used appcmd.exe. Dug a little bit into it and found how to do it:
.\appcmd.exe set app /app.name: "WEBSITE" /applicationPool:POOLNAME
Hope this helps anyone else trying to do the same thing.