@echo off
echo 注：请“以管理员身份运行”该文件
echo 正在添加IIS，可能需要几分钟到几十分钟
dism /Online /Enable-Feature /FeatureName:IIS-WebServerRole /NoRestart
dism /Online /Enable-Feature /FeatureName:IIS-WebServer /NoRestart
dism /Online /Enable-Feature /FeatureName:IIS-CommonHttpFeatures /NoRestart
dism /Online /Enable-Feature /FeatureName:IIS-StaticContent /NoRestart
dism /Online /Enable-Feature /FeatureName:IIS-DefaultDocument /NoRestart
dism /Online /Enable-Feature /FeatureName:IIS-DirectoryBrowsing /NoRestart
dism /Online /Enable-Feature /FeatureName:IIS-HttpErrors /NoRestart
dism /Online /Enable-Feature /FeatureName:IIS-HttpRedirect /NoRestart
dism /Online /Enable-Feature /FeatureName:IIS-ApplicationDevelopment /NoRestart
dism /Online /Enable-Feature /FeatureName:IIS-NetFxExtensibility /all /NoRestart
dism /Online /Enable-Feature /FeatureName:IIS-NetFxExtensibility45 /all /NoRestart
dism /Online /Enable-Feature /FeatureName:NetFx4Extended-ASPNET45 /all /NoRestart
dism /Online /Enable-Feature /FeatureName:IIS-ISAPIExtensions /NoRestart
dism /Online /Enable-Feature /FeatureName:IIS-ISAPIFilter /NoRestart
dism /Online /Enable-Feature /FeatureName:IIS-Security /NoRestart
dism /Online /Enable-Feature /FeatureName:IIS-BasicAuthentication /NoRestart
dism /Online /Enable-Feature /FeatureName:IIS-WindowsAuthentication /NoRestart
dism /Online /Enable-Feature /FeatureName:IIS-DigestAuthentication /NoRestart
dism /Online /Enable-Feature /FeatureName:IIS-URLAuthorization /NoRestart
dism /Online /Enable-Feature /FeatureName:IIS-RequestFiltering /NoRestart
dism /Online /Enable-Feature /FeatureName:IIS-IPSecurity /NoRestart
dism /Online /Enable-Feature /FeatureName:IIS-Performance /NoRestart
dism /Online /Enable-Feature /FeatureName:IIS-WebServerManagementTools /NoRestart
dism /Online /Enable-Feature /FeatureName:IIS-ManagementConsole /NoRestart
dism /Online /Enable-Feature /FeatureName:IIS-ManagementScriptingTools /NoRestart
dism /Online /Enable-Feature /FeatureName:IIS-ManagementService /NoRestart
dism /Online /Enable-Feature /FeatureName:IIS-IIS6ManagementCompatibility /NoRestart
dism /Online /Enable-Feature /FeatureName:IIS-Metabase /NoRestart
dism /Online /Enable-Feature /FeatureName:IIS-WMICompatibility /NoRestart
dism /Online /Enable-Feature /FeatureName:IIS-LegacyScripts /NoRestart
dism /Online /Enable-Feature /FeatureName:IIS-LegacySnapIn /NoRestart
dism /Online /Enable-Feature /FeatureName:WAS-WindowsActivationService /NoRestart
dism /Online /Enable-Feature /FeatureName:WAS-ProcessModel /NoRestart
dism /Online /Enable-Feature /FeatureName:WAS-NetFxEnvironment /all /NoRestart
dism /Online /Enable-Feature /FeatureName:WAS-ConfigurationAPI /NoRestart
dism /Online /Enable-Feature /FeatureName:IIS-ASPNET45 /all /NoRestart
echo 操作已处理完毕!
if "%1" NEQ "noWait" pause

