Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #=======================================
- # Addtional IIS set up
- # 1. Creates new App pools
- # 2. Creates new Applications on App server
- #=======================================
- param($createUnderWebsite, $webSiteName, $physicalPath)
- Try
- {
- if(!(Test-Path $physicalPath))
- {
- New-Item -ItemType directory -Path $physicalPath -ErrorAction Continue
- }
- New-WebAppPool -Force $webSiteName -ErrorAction Continue
- New-WebApplication -Name $webSiteName -Site $createUnderWebsite -PhysicalPath $physicalPath -ApplicationPool $webSiteName -Force
- }
- Catch {
- "Exception Message: $($_.Exception.Message)"
- }
- finally {
- #"List App Pools"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement