Copysettings script

Introduction

The copy settings script can be used to:

 

Preparations

  1. Download the zipfile called CopySettings
  2. Make sure that the .zip package is unblocked.
    Right click on the .zip file and choose ‘properties’
    Then click Unblock and Apply

 

Configure Properties

  1. Edit the properties file (will open in PowerShell ISE).

  2. Set inputOperation:
    1. backup = Create a local backup of the UCC site(s), can be used to restore to a new or the same location

    2. restore = Restore a local backup to SharePoint

    3. sidebyside = Do a backup and restore in one go, useful when moving to a new site collection (for example 5.2 to 6.0)

      Note With sidebyside the input for the restore needs be enter separately under the header "Side by side configuration".

  3. Fill in the site URL (this is the url of the main site collection which contains all ucc sites.) The single site can be selected when the script is executed.

  4. Choose the authentication method:
    1. User Authentication:
      1. inputUsername = Domain and Username of the UCC Service account or SharePoint Online account)

      2. inputPassword = (Encrypted) Password of the account

      3. inputPasswordEncrypted = Enable or disable that the password needs to be encrypted.

        Note Encrypt password script is located in the same folder as the properties.ps1.

    2. App Authentication (SPOnline only):
      1. inputAppId = ClientId is the id created during the installation of the UCC Creator, Learn More
      2. inputAppSecret = ClientSecret is the client secret created during the installation of the UCC Creator, Learn More
  5. Select client mode:
    1. 2010 = SharePoint 2010 on premise
    2. 2013 = SharePoint 2013 on premise
    3. 2016 = SharePoint 2016 on premise
    4. 2019 = SharePoint 2019 on premise
    5. online = SharePoint Online
  6. Select SharePoint version:
    1. inputv2Template - y = SharePoint templateSettings and Content Management for Anywhere365, based on SharePoint server or SharePoint Office 365 6.0 (UCC Creator)
    2. inputv2Template - n = SharePoint template 5.2
  7. Select which libraries should be copied. (Libraries are larger and will take longer to copy)

  8. Select is the permissions should be copied.

    Warning Make sure the account exist when moving the a new environment (For example to SharePoint Online)

  9. (Optional) point to the path for the UCC Creator. This is needed for sidebyside or restore the an UCC creator site collection.

  10. Save the properties file

 

Backup - Execute script

  1. Open PowerShell as administrator

  2. Navigate to the copysettings folder.

  3. Run the sptemplate_copysettings script.

  4. You will be able to select the site you want to backup

  5. A new folder will be created inside the copysettings folder with the name SettingsBackup

 

Restore - Execute script

Scenario A. to recreate ucc settings sites in the same site collection

  1. In the backup folder rename the ucc folder name to the new name.

  2. Edit the properties file and use restore mode

  3. The script will ask if you want to overwrite. This is ok because the name is changed and a new site is created.

  4. Your new site is created and you can change the url in the ucc config to the new site.

 

Scenario B. to move a site to a new site collection

  1. Edit the properties file

  2. Use restore mode and change the siteurl into the new sitecollection

  3. The script will ask if you want to overwrite. This is ok because the sitecollection is new.

  4. Your new site is created and you can change the url in the ucc config to the new site.

 

SidebySide - Execute script

  1. Open PowerShell as administrator

  2. Navigate to the copysettings folder.

  3. Run the sptemplate_copysettings script.

  4. You will be able to select the site you want to backup

  5. A new folder will be created inside the copysettings folder with the name SettingsBackup

  6. The script will now restore the backed up sites to the target Site collection