安裝與設定 WMF 5.1Install and Configure WMF 5.1

重要

WMF 5.1 已取代 WMF 5.0。WMF 5.0 is superseded by WMF 5.1. 使用 WMF 5.0 的使用者必須升級至 WMF 5.1 才能獲得支援。Users with WMF 5.0 must upgrade to WMF 5.1 to receive support. WMF 5.1 需要 .NET Framework 4.5.2 (或更新版本)。WMF 5.1 requires the .NET Framework 4.5.2 (or above). 雖然安裝會成功,但若未安裝 .NET 4.5.2 (或更新版本),主要功能將會失敗。Installation will succeed, but key features will fail if .NET 4.5.2 (or above) is not installed.

下載並安裝 WMF 5.1 套件Download and install the WMF 5.1 package

為適用於其安裝所在的作業系統和架構下載 WMF 5.1 封裝︰Download the WMF 5.1 package for the operating system and architecture you wish to install it on:

作業系統Operating System PrerequisitesPrerequisites 封裝連結Package Links
Windows Server 2012 R2Windows Server 2012 R2 Win8.1AndW2K12R2-KB3191564-x64.msuWin8.1AndW2K12R2-KB3191564-x64.msu
Windows Server 2012Windows Server 2012 W2K12-KB3191565-x64.msuW2K12-KB3191565-x64.msu
Windows Server 2008 R2Windows Server 2008 R2 .NET Framework 4.5.2.NET Framework 4.5.2 Win7AndW2K8R2-KB3191566-x64.ZIPWin7AndW2K8R2-KB3191566-x64.ZIP
Windows 8.1Windows 8.1 x64: Win8.1AndW2K12R2-KB3191564-x64.msux64: Win8.1AndW2K12R2-KB3191564-x64.msu
x86: Win8.1-KB3191564-x86.msux86: Win8.1-KB3191564-x86.msu
Windows 7 SP1Windows 7 SP1 .NET Framework 4.5.2.NET Framework 4.5.2 x64: Win7AndW2K8R2-KB3191566-x64.ZIPx64: Win7AndW2K8R2-KB3191566-x64.ZIP
x86: Win7-KB3191566-x86.ZIPx86: Win7-KB3191566-x86.ZIP
  • 安裝 WMF 5.1 RTM 之前,必須先解除安裝 WMF 5.1 Preview。WMF 5.1 Preview must be uninstalled before installing WMF 5.1 RTM.
  • WMF 5.1 可直接透過 WMF 5.0 或 WMF 4.0 安裝。WMF 5.1 may be installed directly over WMF 5.0 or WMF 4.0.
  • 在 Windows 7 和 Windows Server 2008 R2 上安裝 WMF 5.1 之前,不需要先安裝 WMF 4.0。It is not required to install WMF 4.0 prior to installing WMF 5.1 on Windows 7 and Windows Server 2008 R2.

安裝適用於 Windows Server 2008 R2 和 Windows 7 的 WMF 5.1Install WMF 5.1 for Windows Server 2008 R2 and Windows 7

注意

Windows Server 2008 R2 和 Windows 7 的安裝指示已變更,且與其他套件的指示不同。Installation instructions for Windows Server 2008 R2 and Windows 7 have changed, and differ from the instructions for the other packages. 適用於 Windows Server 2012 R2、Windows Server 2012 和 Windows 8.1 的安裝指示如下。Installation instructions for Windows Server 2012 R2, Windows Server 2012, and Windows 8.1 are below.

Windows Server 2008 R2 SP1 和 Windows 7 SP1 的 WMF 5.1 必要條件WMF 5.1 Prerequisites for Windows Server 2008 R2 SP1 and Windows 7 SP1

在 Windows Server 2008 R2 SP1 或 Windows 7 SP1 上安裝 WMF 5.1 需要下列各項:Installation of WMF 5.1 on either Windows Server 2008 R2 SP1 or Windows 7 SP1, requires the following:

  • 必須安裝最新的 Service Pack。Latest service pack must be installed.
  • 「不可以」安裝 WMF 3.0。WMF 3.0 must not be installed. 在具有 WMF 3.0 的情況下安裝 WMF 5.1 會導致 PSModulePath ($env:PSModulePath) 遺失,這可能造成其他應用程式失敗。Installing WMF 5.1 over WMF 3.0 will result in the loss of the PSModulePath ($env:PSModulePath), which can cause other applications to fail. 在安裝 WMF 5.1 之前,您必須解除安裝 WMF 3.0,或是儲存 PSModulePath,並在完成 WMF 5.1 安裝之後手動將其還原。Before installing WMF 5.1, you must either un-install WMF 3.0, or save the PSModulePath and then restore it manually after WMF 5.1 installation is complete.
  • WMF 5.1 需要至少.NET Framework 4.5.2WMF 5.1 requires at least .NET Framework 4.5.2. 您可以遵循下載位置的指示來安裝 Microsoft.NET Framework 4.5.2。You can install Microsoft .NET Framework 4.5.2 by following the instructions at the download location.

在 Windows Server 2008 R2 和 Windows 7 上安裝 WMF 5.1Installing WMF 5.1 on Windows Server 2008 R2 and Windows 7

  1. 瀏覽至您用來下載 ZIP 檔案的資料夾。Navigate to the folder into which you downloaded the ZIP file.

  2. 以滑鼠右鍵按一下 ZIP 檔案,並選取 [解壓縮全部...]。ZIP 檔案包含兩個檔案:MSU 和 Install-WMF5.1.ps1 指令碼檔案。Right-click on the ZIP file, and select Extract All.... The ZIP file contains two files: an MSU and the Install-WMF5.1.ps1 script file. 一旦您解壓縮 ZIP 檔案,您可以將內容複製到執行 Windows 7 或 Windows Server 2008 R2 的任何電腦。Once you have unpacked the ZIP file, you can copy the contents to any machine running Windows 7 or Windows Server 2008 R2.

  3. 將 ZIP 檔案內容解壓縮之後,以系統管理員身分開啟 PowerShell,然後瀏覽至包含 ZIP 檔案的資料夾。After extracting the ZIP file contents, open PowerShell as administrator, then navigate to the folder containing the contents of the ZIP file.

  4. 在該資料夾中執行 Install-WMF5.1.ps1 指令碼,並遵循指示。Run the Install-WMF5.1.ps1 script in that folder, and follow the instructions. 此指令碼會檢查本機電腦上的必要條件,並安裝 WMF 5.1 (如果符合必要條件)。This script will check the prerequisites on the local machine, and install WMF 5.1 if the prerequisites have been met. 以下列出必要條件。The prerequisites are listed below.

    Install-WMF5.1.ps1 會採用下列參數以簡化針對 Windows Server 2008 R2 和 Windows 7 上安裝的自動化:Install-WMF5.1.ps1 takes the following parameters to ease automating the installation on Windows Server 2008 R2 and Windows 7:

    • AcceptEula:當包含此參數時,會自動接受 EULA 且不會顯示。AcceptEula: When this parameter is included, the EULA is automatically accepted and will not be displayed.
    • AllowRestart:此參數只能在指定 AcceptEula 時使用。AllowRestart: This parameter can only be used if AcceptEula is specified. 如果包含此參數,且安裝 WMF 5.1 之後需要重新啟動,則在完成安裝之後會立即重新啟動而不提示。If this parameter is included, and a restart is required after installing WMF 5.1, the restart will happen without prompting immediately after the installation is completed.

WinRM 相依性WinRM Dependency

Windows PowerShell 預期狀態設定 (DSC) 取決於 WinRM。Windows PowerShell Desired State Configuration (DSC) depends on WinRM. 在 Windows Server 2008 R2 和 Windows 7 上預設不啟用 WinRM。WinRM is not enabled by default on Windows Server 2008 R2 and Windows 7. 若要啟用 WinRM,請在 Windows PowerShell 提高權限的工作階段中,執行 Set-WSManQuickConfigRun Set-WSManQuickConfig, in a Windows PowerShell elevated session, to enable WinRM.

安裝適用於 Windows Server 2012 R2、Windows Server 2012 和 Windows 8.1 的 WMF 5.1Install WMF 5.1 for Windows Server 2012 R2, Windows Server 2012, and Windows 8.1

從 Windows 檔案總管安裝Install from Windows File Explorer

  1. 瀏覽至您用來下載 MSU 檔案的資料夾。Navigate to the folder into which you downloaded the MSU file.
  2. 按兩下 MSU 以執行。Double-click the MSU to run it.

從命令提示字元安裝Installing from the Command Prompt

  1. 下載您電腦架構的正確封裝之後,以提高的使用者權限 (以系統管理員身分執行) 開啟 [命令提示字元] 視窗。After downloading the correct package for your computer's architecture, open a Command Prompt window with elevated user rights (Run as Administrator). 在 Windows Server 2012 R2、Windows Server 2012 或 Windows Server 2008 R2 SP1 的 Server Core 安裝選項上,預設會以提高的使用者權限開啟 [命令提示字元]。On the Server Core installation options of Windows Server 2012 R2, Windows Server 2012, or Windows Server 2008 R2 SP1, Command Prompt opens with elevated user rights by default.
  2. 將目錄變更為您已下載或複製 WMF 5.1 安裝封裝的資料夾。Change directories to the folder into which you have downloaded or copied the WMF 5.1 installation package.
  3. 執行下列其中一個命令:Run one of the following commands:
    • 在執行 Windows Server 2012 R2 或 Windows 8.1 x64 的電腦上執行 Win8.1AndW2K12R2-KB3191564-x64.msu /quietOn computers that are running Windows Server 2012 R2 or Windows 8.1 x64, run Win8.1AndW2K12R2-KB3191564-x64.msu /quiet.
    • 在執行 Windows Server 2012 的電腦上執行 W2K12-KB3191565-x64.msu /quietOn computers that are running Windows Server 2012, run W2K12-KB3191565-x64.msu /quiet.
    • 在執行 Windows 8.1 x86 的電腦上執行 Win8.1-KB3191564-x86.msu /quietOn computers that are running Windows 8.1 x86, run Win8.1-KB3191564-x86.msu /quiet.

注意

安裝 WMF 5.1 需要重新開機。Installing WMF 5.1 requires a reboot. 使用 /quiet 選項會將系統重新開機,而不發出警告。Using the /quiet option will reboot the system without warning. 使用 /norestart 選項可避免重新開機。Use the /norestart option to avoid rebooting. 不過,在重新開機之前都不會安裝 WMF 5.1。However, WMF 5.1 will not be installed until you have rebooted.