IIS新建站点、配置应用程序池
作者:互联网
#新建IIS站点,设置主机头,设置应用程序池 $domainname = "domainname" $site_owa = "OWA" $site_owa_dir = "d:\$site_owa" $url_owa = ($site_owa + "." + $domainname).ToLower() New-WebAppPool -Name $site_owa New-Website -Name $site_owa -Port 80 -HostHeader $url_owa -PhysicalPath $site_owa_dir -ApplicationPool $site_owa New-WebBinding -Name $site_owa -IPAddress "*" -Port 443 -HostHeader $url_owa -Protocol "https" #修改应用程序池标识为"NetworkService" $pollname = "MailAuth" $AppPool = Get-ItemProperty "IIS:\AppPools\$pollname" $AppPool.processModel.identityType = "NetworkService" $AppPool | set-item $AppPool.processModel.identityType #删除默认站点 Import-Module webadministration Remove-Website -Name "Default Web Site" -ErrorAction silentlycontinue #更改IISLog位置 $iislogdir = "$drive\IISlog" Set-WebConfigurationProperty "/system.applicationHost/sites/siteDefaults" -name logfile.directory -value $iislogdir #修改应用程序池队列长度 $defaultAppPool = Get-ItemProperty IIS:\AppPools\DefaultAppPool (Get-ItemProperty IIS:\AppPools\DefaultAppPool\).queueLength Set-ItemProperty -Path $defaultAppPool.PSPath -Name queueLength -Value 5000
标签:AppPool,Name,IIS,owa,site,应用程序,站点,ItemProperty 来源: https://www.cnblogs.com/dreamer-fish/p/16418866.html