使用 Windows PowerShell 來設定非網域成員 Client 的電腦Use Windows PowerShell to Configure Non-Domain Member Client Computers

適用於:Windows Server(以每年次管道)、Windows Server 2016Applies To: Windows Server (Semi-Annual Channel), Windows Server 2016

您可以手動設定 BranchCache client 電腦上的快取分散式的模式使用此程序,或裝載快取模式。You can use this procedure to manually configure a BranchCache client computer for distributed cache mode or hosted cache mode.

注意

如果您已經設定 BranchCache client 電腦使用群組原則、 群組原則設定覆寫任何手動 client 電腦套用原則設定。If you have configured BranchCache client computers using Group Policy, the Group Policy settings override any manual configuration of client computers to which the policies are applied.

資格在系統管理員,或相當於的最低需求才能執行此程序。Membership in Administrators, or equivalent is the minimum required to perform this procedure.

若要讓 BranchCache 分散式或裝載快取模式To enable BranchCache distributed or hosted cache mode

  1. BranchCache client 在電腦上您想要設定,以系統管理員的身分執行 Windows PowerShell,然後執行下列其中一項。On the BranchCache client computer that you want to configure, run Windows PowerShell as an Administrator, and then do one of the following.

    • 若要設定 client 電腦 BranchCache 分散式快取模式,輸入下列命令,,然後按 ENTER 鍵。To configure the client computer for BranchCache distributed cache mode, type the following command, and then press ENTER.

      Enable-BCDistributed

    • 若要設定 client 電腦 BranchCache 裝載快取模式,輸入下列命令,,然後按 ENTER 鍵。To configure the client computer for BranchCache hosted cache mode, type the following command, and then press ENTER.

      Enable-BCHostedClient

      提示

      如果您想要指定的提供裝載快取的伺服器,使用-ServerNames參數以逗號分隔讓參數值為裝載快取伺服器清單。If you want to specify the available hosted cache servers, use the -ServerNames parameter with a comma separated list of your hosted cache servers as the parameter value. 例如,如果您有兩個裝載快取伺服器名 HCS1 和 HCS2,設定 client 電腦裝載快取模式使用下列命令。For example, if you have two hosted cache servers named HCS1 and HCS2, configure the client computer for hosted cache mode with the following command.

      Enable-BCHostedClient -ServerNames HCS1,HCS2