码迷,mamicode.com
首页 > Web开发 > 详细

IIS配置(安装IIS、.Net、更改IIS Log目录位置)

时间:2015-06-30 17:50:51      阅读:149      评论:0      收藏:0      [点我收藏+]

标签:

 

#安装IIS、.NetFramework 3.5
Import-Module servermanager
Get-WindowsFeature web-* | ? {$_.Name -ne "Web-WHC" -and $_.Name -ne "Web-Ftp-Server" -and $_.Name -ne "Web-Ftp-Ext" -and $_.Name -ne "Web-Ftp-Service" -and $_.Name -ne "Web-Custom-Logging" -and $_.Name -ne "Web-ODBC-Logging" -and $_.Name -ne "Web-Client-Auth" -and $_.Name -ne "Web-Cert-Auth" -and $_.Name -ne "Web-DAV-Publishing"} | Add-WindowsFeature
Add-WindowsFeature NET-Framework,WAS -IncludeAllSubFeature

#新建wwwroot目录
cmd /c "md D:\wwwroot"

#删除默认站点
Import-Module webadministration
Remove-Website -Name "Default Web Site"

#更改IISLog位置到 D:\IISLog
cmd /c "md D:\IISlog"
$iislogdir = "D:\IISLog"
Set-WebConfigurationProperty "/system.applicationHost/sites/siteDefaults" -name logfile.directory -value $iislogdir

 

IIS配置(安装IIS、.Net、更改IIS Log目录位置)

标签:

原文地址:http://www.cnblogs.com/dreamer-fish/p/4610952.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!