Geeks With Blogs
The Quandary Phase This code was generated by a tool. February 2013 Entries
Create IIS App Pool and Site With Windows Powershell
Here’s a simple code snippet which shows how to create a new app pool and site in IIS via a Powershell script. It also checks for app pool and site existence before trying to create new items. It’s quite a nice example of why Powershell is so easy to work with- yes, you can achieve the same thing in a batch file, but this is just so much cleaner: Import-Module WebAdministration$iisAppPoo... = "my-test-app"$iisAppPoolDot... = "v4.0"$iisAppName = "my-test-app.test"$director... = "D:\SomeFolder"#navigate ......

Posted On Sunday, February 24, 2013 1:30 AM

Copyright © Adam Pooler | Powered by: GeeksWithBlogs.net