Configuring BranchCache in Windows 7

Before you start

Objectives: Learn how to enable and configure BranchCache using Group Policy or command line (netsh command).

Prerequisites: you have to know what is BranchCache.

Key terms: BranchCache, Windows, Group Policy, command line, netsh


 Prerequisites

Remember, before we can use BranchCache feature on our local computer, we have to have a BranchCache enabled server. This means that the BranchCache feature has to be installed on the server. This can be done by using the Add Features Wizard.

 1 Add Feature Wizard

Add Feature Wizard in Windows Server 2008 R2

Also, we have to go to the properties of shared folder on the server, go to the Sharing tab, click on the Advanced Sharing button, and then click on the Caching button. We will see a window like this.

 2 Offline Settings

Offline Settings for Shared Folder

Note that the Enable BranchCache option is checked.

BranchCache Configuration in Group Policy

To configure our Windows 7 machine for BranchCache, we have to run a set of commands. We can either use Local Group Policy editor or the command line. To open Group Policy editor, we can enter gpedit.msc in search. In Group Policy editor, we can configure policies related to BranchCache in Computer Configuration > Administrative Tools > Network > BranchCache.

 3 BranchCache in Group Policy

BranchCache Policies

Keep in mind that if we configure BranchCache in Group Policy, we have to manually configure Windows Firewall with Advanced Security settings. This includes Inbound and Outbound rules.

 4 Inbound Rules

Inbound Firewall Rules

 5 Outbound Rules

Outbound Firewall Rules

If we configure BranchCache from the command line, firewall rules will be automatically enabled for us.

BranchCache Configuration in Command Line

To configure BranchCache in command line (cmd), we will first run it as Administrator. For example, to enable BranchCache in distributed mode we would enter the “netsh branchcache set service mode=distributed” command.

 6 netsh Command

netsh branchcache Command

Notice that the firewall rules are enabled, and service start type is set to manual (which is the right type). To check the status of BranchCache on computer we can enter the “netsh branchcache show status“.

 7 netsh Status

BranchCache Status

We can also configure the cache size. For example, if we want to set the cache size to 10% of our disk space, we would enter the command “netsh branchcache set cachesize size=10 percent=true“.

 8 Cache Size

BranchCache Cache Size

To see the local cache usage we can enter the “netsh branchcache show localcache“.

 9 Local Cache

BranchCache Local Cache

Notice that here we can also see the location of the cache.