| 系統版本 | 路徑 | 關鍵字搜尋 |
| Windows XP | 控制台 → 新增/移除程式 → 新增/移除 Windows 元件 | 「Windows 元件精靈」 |
| Windows 7 | 控制台 → 程式集 → 程式和功能 → 左側 開啟或關閉 Windows 功能 | 「Windows 功能」 |
| Windows 8/8.1 | 控制台 → 程式和功能 → 左側 開啟或關閉 Windows 功能 | 同 Win7 |
| Windows 10/11 | 設定 → 應用程式 → 選用功能 → 更多 Windows 功能 (或控制台同 Win7) | 「啟用或關閉 Windows 功能」 |
常用元件安裝實戰
1. 安裝 IIS (Internet Information Services)
- 開啟「Windows 功能」視窗。
- 展開 Internet Information Services → 勾選:
— Web 管理工具 (含 IIS 管理主控台)
— 全球資訊網服務 → 應用程式開發 (ASP.NET、CGI、ISAPI) / 一般 HTTP 功能 (靜態內容、預設文件、目錄瀏覽) / 健康與診斷 / 安全性 (基本/Windows/要求篩選驗證) / 效能 (靜態/動態內容壓縮)。
— FTP 伺服器 (需 FTP 服務、FTP 管理主控台)。
- 確定 → 等待安裝完成 (可能需 Windows 更新下載檔案) → 瀏覽器輸入
https://localhost 驗證預設頁面。
2. 安裝 Telnet Client (測試 TCP 連通性神器)
- Windows 功能清單中勾選 Telnet Client (非 Telnet Server),確定安裝。
- 驗證:Win+R →
telnet towel.blinkenlights.nl 看星球大戰 ASCII 動畫,或 telnet 測試埠口連通。
3. 啟用 WSL 2 (Win10 2004+/Win11)
- Windows 功能勾選 適用於 Linux 的 Windows 子系統 + 虛擬機器平台。
- 重啟後 PowerShell 管理員執行:
wsl --install (預設 Ubuntu) 或 wsl --install -d 。
命令列安裝 (自動化/無人值守)
# DISM (適用 Win7+)
dism /online /enable-feature /featurename:IIS-WebServerRole /featurename:IIS-FTPServer /featurename:TelnetClient /all /norestart
# PowerShell (Win10/11 推薦)
Enable-WindowsOptionalFeature -Online -FeatureName "IIS-WebServerRole", "IIS-FTPServer", "TelnetClient" -All -NoRestart
# WSL
dism /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /featurename:VirtualMachinePlatform /all /norestart
移除已安裝元件
同樣進入「Windows 功能」,取消勾選對應項目 → 確定 → 重啟。或用 DISM/PowerShell Disable-WindowsOptionalFeature / dism /disable-feature。
常見問題
- Q:安裝卡住/報錯 0x800f0954/0x800f081f?
- A:指定修復來源:
dism /online /enable-feature /featurename:... /Source:wim:D:\sources\install.wim:1 /LimitAccess (D 為掛載 ISO 盤符)。或執行 sfc /scannow + DISM /Online /Cleanup-Image /RestoreHealth 修復元件存儲。
- Q:XP 安裝 IIS 提示找不到檔案?
- A:需提供 XP 安裝光碟/ISO 路徑,或下載 IIS 5.1 完整安裝包指定路徑。
- Q:如何查詢功能名稱 (FeatureName)?
- A:PowerShell:
Get-WindowsOptionalFeature -Online | Where State -eq 'Disabled' | Select FeatureName, Description。
Windows 功能是系統能力的模組化擴展包。按需啟用、腳本化部署、定期審核停用項,是系統精簡與安全的基礎功課。
copyright ©
萬盛學電腦網 all rights reserved