Distributed BranchCache – Change Default TCP Port

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 :

10 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 😉

  1. Nice, thanks for sharing!

    Do you need to change the port on the SCCM Distribution Point (the content server) also for this to work?

  2. Thanks for sharing this ! I send the link to peoples managing “BranchCache” in the hope they use what you’ve done, because here we are developpers with local WampServer and it’s a real pain since they install the new version SCCM 2012.
    Best regards

    1. Hi Philippe,

      I’ve made this script for the exact same reason because in our study we discovered that XAMP was running on some Devs workstations so we decided to change the default port for another one before it could make any trouble ! If you or your admins needs help implementing it do not hesitate to contact me.


Leave a Reply to Andreas Cancel reply

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