1. 备份
%windir%system32inetsrvappcmd.exe add backup "My Backup Name"
2.还原
%windir%system32inetsrvappcmd.exe restore backup "My Backup Name"
3.删除备份
%windir%system32inetsrvappcmd.exe delete backup "My Backup Name"
4.查看备份
%windir%system32inetsrvappcmd.exe list backup
如果要批量搬移IIS上的数据到其他的服务器,需要导出所有应用池和网站:
1. 导出应用池
%windir%system32inetsrvAppCmd.exe LIST APPPOOL /config /XML > poolappcmdexport.xml
2. 导出网站配置
%windir%system32inetsrvAppCmd.exe LIST SITE /config /XML > iisappcmdexport.xml
3.导入应用池
%windir%system32inetsrvAppCmd.exe ADD APPPOOL /IN < poolappcmdexport.xml
4. 导入网站配置
%windir%system32inetsrvAppCmd.exe ADD SITE /IN < iisappcmdexport.xml
优化machine.config
路径: C:WindowsMicrosoft.NETFramework64v4.0.30319Config
<processModel enable="true" requestQueueLimit="100000" maxWorkerThreads="1000" maxIoThreads="1000" minWorkerThreads="200" minIoThreads="200"/>
<processModel enable="true" requestQueueLimit="100000" maxWorkerThreads="1000" maxIoThreads="1000" minWorkerThreads="400" minIoThreads="400"/>
默认是
<processModel autoConfig="true"/>
自动安装iis
Install-WindowsFeature -ConfigurationFilePath d:服务器iis安装配置.xml