大网数据广告活动
网络与域名解析

Create Content Server Data Packages for Web and File Content (Optional)

· 52CE 我爱测

Learn how to prehash content on Web and file servers, and then create data packages to import on your hosted cache server.

You can use this procedure to prehash content on Web and file servers, and then create data packages to import on your hosted cache server.

This procedure is optional because you are not required to prehash and preload content on your hosted cache servers. If you do not preload content, data is added to the hosted cache automatically as clients download it over the WAN connection.

This procedure provides instructions for prehashing content on both file servers and Web servers. If you do not have one of those types of content servers, you do not have to perform the instructions for that content server type.

Important: Before you perform this procedure, you must install and configure BranchCache on your content servers. In addition, if you plan on changing the server secret on a content server, do so before pre-hashing content – modifying the server secret invalidates previously-generated hashes.

To perform this procedure, you must be a member of the Administrators group.

To create content server data packages

  1. On each content server, locate the folders and files that you want to prehash and add to a data package. Identify or create a folder where you want to save your data package later in this procedure.

  2. On the server computer, open Windows PowerShell with Administrator privileges.

  3. Do one or both of the following, depending on the types of content servers that you have:

    [!NOTE] The value for the –Path parameter is the folder where your content is located. You must replace the example values in the commands below with a valid folder location on your content server that contains data that you want to prehash and add to a package.

    • If the content that you want to prehash is on a file server, type the following command, and then press ENTER.

      Publish-BCFileContent -Path D:\share -StageData
      
    • If the content that you want to prehash is on a Web server, type the following command, and then press ENTER.

      Publish-BCWebContent –Path D:\inetpub\wwwroot -StageData
      
  4. Create the data package by running the following command on each of your content servers. Replace the example value (D:\temp) for the –Destination parameter with the location that you identified or created at the beginning of this procedure.

    Export-BCDataPackage –Destination D:\temp
    
  5. From the content server, access the share on your hosted cache servers where you want to preload content, and copy the data packages to the shares on the hosted cache servers.

To continue with this guide, see Import Data Packages on the Hosted Cache Server (Optional).

Source: Microsoft Learn / Windows Server documentation by Microsoft and contributors (upstream author metadata: robinharwood). Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Server documentation
适用范围
Windows Server · Source date 08/07/2020
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。