Distributed BranchCache – Change Default TCP Port

***EDIT
During our test we noticed that if a computer has already been “infected” by a BranchCache GPO this could lead to some random problems because the original script directly edit the “policies” registry keys. So at the bottom of this post you’ll see another script that does exactly the same but without modifying the “policies” registry keys. I also edited the first one to only modify/create the correct registry keys and not the policies registry keys.

This post is about something not well documented on the Net. How do you change the default TCP Port used by BranchCache ? First of all, DO NOT try to do this with the BranchCache GPO because, by default the GPO will create a Reservation URL targeting TCP Port 80 and if the settings are set by GPO you won’t be able to create a new Reservation URL. So if you want to change the BranCache default TCP Port, you will have to rely on some Registry edition and NetSh.

One side effect I’ve noticed by modifying the BranchCache default TCP Port is some issues with the Performance Monitor not reporting the cache usage especially in combination with SMB (File Share BranchCaching) but nothing really annoying.

So Here is the CmdLet I’ve made to Enable BranchCache and Change the default configuration on a Windows 7 workstation (This should also work with Windows 8 & 10 but I wasn’t able to test it yet)

Of course this has to be run from an elevated powershell session 😉

Here is the same script adapted to avoid direct policies registry key modifications :

6 thoughts on “Distributed BranchCache – Change Default TCP Port”

    1. In the case of a “Distributed Cache mode” configuration, the answer is no. This is only required for “Hosted Cache mode”.
      This script is the script I wrote for my company and it’s working very well for our 20.000 workstations 😉

Leave a Reply

Your email address will not be published. Required fields are marked *