BrightWork Template Design Sync enables you to make changes to a BrightWork template and pull those changes into project sites that were created using the template.

This document describes how to:

  • Sync multiple sites simultaneously with PowerShell
  • Remove site from template bindings on site-by-site basis using either SharePoint Designer or PowerShell

Prerequisites

Ideally, you should be a SharePoint administrator with experience in using PowerShell. To carry out the PowerShell tasks described in this document, you need admin-level access to the SharePoint server on which BrightWork is installed.

You should also review the Design Sync topics in the BrightWork help, so you fully understand what the Design Sync does.

Sync Sites with Template

The Template Design Sync works on a site-by-site basis. If you have an updated template that has been used to create many sites, manually running the Design Sync on all these sites could take a while.

This section describes how to use a PowerShell Script, provided by BrightWork, to sync multiple sites in one job.

Determine Template Usage

Before you start this process, you should check to see what sites were created from the template. You can do this using the Determine Template Usage feature. This will give you visibility over the sites that will be impacted by the change, so you can decide what sites, if any, need to be excluded from the Sync. It will also enable you to establish if anyone needs to be notified regarding the impending changes.

  1. Navigate to the Template home page and click Settings | Site Settings.
  2. Click Determine Template Usage.
  3. Click Locate.

    The list of sites that were created using the Template will be returned.

Request a copy of the PowerShell Zip

  1. Contact BrightWork Support and request a copy of the latest version of the BrightWork Multi-Project Template Design Sync PowerShell.
  2. Login into your server and create the following folder location:
    c:\BrightWork\DesignSyncScripts
  3. Download the BrightWork Multi-Project Template Design Sync PowerShell to this folder.
  4. Extract the zip file to the DesignSyncScripts folder.

Run Multi-Project Template Design Sync PowerShell

The PowerShell Script provided by BrightWork does the following tasks in sequence:

  1. Checks if the URL points to a valid BrightWork Template with sites bound to it.
  2. Checks if a PowerShell script has already been generated for this template, and if so, provides you with an opportunity to either reuse the existing file; rename it; or delete it.
  3. Creates a new PowerShell script that will be used to sync the sites that are bound to the template.
    The generated script uses the template title, for example, if the template was called Project Structured, the script would be called
    SyncProjectsBasedOnTemplateProject Structured.ps1.

To run the Multi-Project Template Design Sync PowerShell:

  1. Click Start, right-click on SharePoint Management Shell and click Run as administrator.
  2. Change the folder to the location of the PowerShell (ps1) script
    cd C:\BrightWork\DesignSyncScripts (or the folder you have downloaded the script to).
  3. Run the below command using the template URL instead of the URL in the command.
    .\GenerateDesignSyncWithCustomSettingsForSpecifiedTemplate.ps1 http://server/sites /templates/templateName
    This will generate a script and save it to the C:\BrightWork\DesignSyncScripts folder.

Edit Generated Script

If you do not want to sync all the sites identified as bound to the template, you can edit the script and comment them out.

  1. Open the script in a code editor like Notepad.
  2. Search for #Comment out.
  3. Enter a # for any site you do not want to sync.
  4. Save and exit the file.

Run Generated Script

  1. Return to the open SharePoint Management Shell window and run the below command, replacing the bold sections with the template title.
    .\SyncProjectsBasedOnTemplateTemplateTitle.ps1 | Out-File -filePath C:\BrightWork\DesignSyncScripts\TemplateTitleTemplateLog.txt
    For example, if the template was called Project Structured (ProjStr), the line to run would be as below.
    .\SyncProjectsBasedOnTemplateProject Structured (ProjStr).ps1| Out-File -filePath C:\BrightWork\DesignSyncScripts\ Project Structured (ProjStr)TemplateLog.txt
  2. Exit the SharePoint Management Shell.

About the Log File

The generated log file contains the below information about every site synced. More information about the nature of these messages can be found in the Site Sync Log list in every site that was synced.

  • No of Errors, i.e. items that the sync was unable to copy
  • No of Warnings, i.e. changes that were skipped due to the design sync settings
  • No of Information messages, i.e. major changes that were synced such as adding and deleting lists
  • Time taken to sync

Remove Bindings

Any project site created from a BrightWork template using the Create Project feature is automatically bound to that template.

This section describes how to remove this binding manually or using a PowerShell script on a site-by-site basis.

Manually Remove Bindings

To manually remove template binding:

  1. Click Settings | Site settings on the site you want to update.
  2. Click Configure Template Binding.
  3. In the Update Template Binding section clear the current field value.

  4. Click Update.
  5. Click OK to confirm the template binding removal.

Remove Bindings with a PowerShell Script

Before proceeding with this task, you should have the URLs of the sites that you want to unbind easily accessible so you can copy and paste them as needed.

To download the BrightWork Template Design Sync Unbind PowerShell:

  1. Contact BrightWork Support and request a copy of the latest version of the BrightWork Template Design Sync Unbind PowerShell.
  2. Login into your server and create the following folder location:
    c:\BrightWork\DesignSyncScripts
  3. Download the BrightWork Template Design Sync Unbind PowerShell to this folder.
  4. Extract the zip file to the DesignSyncScripts folder.

To run the BrightWork Template Design Sync Unbind PowerShell:

  1. Click Start, right-click on SharePoint 2013 Management Shell and click Run as administrator.
  2. Change the directory to the location of the ps1 script
    cd C:\BrightWork\DesignSyncScripts
  3. Run the below command using the site URL instead of the URL in the command.
    .\RemoveTemplateBindingFromProjectWeb.ps1 http://<server>/sites/<sitecollection>/projects/example

If the process was successful, you should see a success message similar to the below.

Was this article useful?

Back to Top