使用 PowerShell 設定伺服器的 應用程式集區 預設值

  ForEach ($sComputer in $global:aComputers) { # Sets Application Pool Configuration Write-Host “Setting Application Pool Configuration $sComputer…”; Start-Timer Write-Host ”  1. 啟動模式 由 OnDemand => AlwaysRunning.” set-webconfigurationproperty /system.applicationHost/applicationPools/applicationPoolDefaults  -name startMode -value 1 Write-Host ”  2. 佇列長度改為5000.” set-webconfigurationproperty /system.applicationHost/applicationPools/applicationPoolDefaults  -name queueLength -value 5000 Write-Host ”  3. 停用 Idle Time 設定 (20 分鐘) => 改為 0″ set-webconfigurationproperty…

0

使用 PowerShell 安裝 IIS

三個步驟: 以管理員身份開啟 PowerShell import-module servermanager add-windowsfeature Web-Server, Web-WebServer, Web-Security,Web-Filtering,Web-Windows-Auth,Web-Basic-Auth,Web-Common-Http,Web-Http-Errors,Web-Static-Content,Web-Default-Doc,Web-Performance,Web-Stat-Compression,Web-Dyn-Compression,Web-Health,Web-Http-Logging,Web-Log-Libraries,Web-Request-Monitor,Web-Http-Tracing,Web-App-Dev,Web-Net-Ext45,Web-Asp-Net45,Web-WebSockets,Web-AppInit,Web-Mgmt-Tools,Web-Mgmt-Console   上述的模組說明請參考: Modules in IIS 8.5 https://docs.microsoft.com/en-us/iis/install/installing-iis-85/installing-iis-85-on-windows-server-2012-r2#modules-in-iis-85  

0