Prepare.ps1 script

The prepare.ps1 script performs all preparations on the initial web server host where applications are located such as Authentication Server, SS&C | Blue Prism® Hub, and SS&C | Blue Prism® Interact.

The prepare.ps1 script must be run first on the initial web server host (where Hub and Interact were installed from the Blue Prism installer).

You will also need the Blue Prism Data Protector in your C:\Scripts folder. For more information about this tool, see Blue Prism Data Protector Tool.

The prepare.ps1 script generates files that will be used to create the additional web servers. The output directory is approximately 800 MB in size. Ensure that you have at least 1 GB of free disk space before you run this script.

Functionality

The prepare.ps1 script provides the following functionality:

  • Gathers data from registry and creates registry files.
  • Exports certificates.
  • Prepares applications and services.
  • Performs database migrations.
  • Changes properties in the appsettings.json file.
  • Compresses applications and services root folders.
  • Generates the variable.json file and populates it with data.

Parameters

The prepare.ps1 script contains the following parameters:

Parameter

Description

-HubCacheConnectionString

Specifies the connection string to Blue Prism Hub Distributed Cache database.

This requires the details for the Availability Group Listener and the name of the database you manually created: HubCache.

-AuthServerCacheConnectionString

Specifies the connection string to Blue Prism Authentication Server Distributed Cache database.

This requires the details for the Availability Group Listener and the name of the database you manually created: AuthenticationServerCache.

-FileServiceCacheConnectionString

Specifies the connection string to Blue Prism Distributed Cache database.

This requires the details for the Availability Group Listener and the name of the database you manually created: FileServiceCache.

-InteractCacheConnectionString

Specifies the connection string to Blue Prism Interact Cache database.

This requires the details for the Availability Group Listener and the name of the database you manually created: InteractCache.

This parameter must be included if you are also including the -IncludeInteract parameter. It is not required if you are only preparing Hub for high availability.

-DataProtectorPath

Specifies the full path to the Blue Prism Data Protector executable.

-IncludeInteract

Specifies that you need to gather Blue Prism Interact data and files to be copied onto other Web Server hosts.

This is an optional parameter. If this parameter is not included, only Hub will be impacted by the script.

Run the Prepare script

Ensure that you have at least 1 GB of free disk space before you run this script.

  1. On the initial web server host, run PowerShell as an administrator and change directory to the folder where the scripts are stored, for example:

    Copy
    cd C:\Scripts
  2. Run the Prepare script – you must specify the details for the parameters listed in Parameters. Example scripts are shown below:

    If you have both Blue Prism Hub and Blue Prism Interact installed and are using SQL authentication:

    Copy
    .\prepare.ps1 `
    -HubCacheConnectionString 'Server=aglistener.domain.local;Database=HubCache;User Id=sqladmin;Password=StR0nGP@sswOrD;MultiSubnetFailover=True;' `
    -AuthServerCacheConnectionString 'Server=aglistener.domain.local;Database=AuthenticationServerCache;User Id=sqladmin;Password=StR0nGP@sswOrD;MultiSubnetFailover=True;' `
    -FileServiceCacheConnectionString 'Server=aglistener.domain.local;Database=FileServiceCache;User Id=sqladmin;Password=StR0nGP@sswOrD;MultiSubnetFailover=True;' `
    -InteractCacheConnectionString 'Server=aglistener.domain.local;Database=InteractCache;User Id=sqladmin;Password=StR0nGP@sswOrD;MultiSubnetFailover=True;' `
    -DataProtectorPath '.\BluePrismDataProtector.Console.exe' `
    -IncludeInteract

    If you only have Blue Prism Hub installed and are using SQL authentication:

    Copy
    .\prepare.ps1 `
    -HubCacheConnectionString 'Server=aglistener.domain.local;Database=HubCache;User Id=sqladmin;Password=StR0nGP@sswOrD;MultiSubnetFailover=True;' `
    -AuthServerCacheConnectionString 'Server=aglistener.domain.local;Database=AuthenticationServerCache;User Id=sqladmin;Password=StR0nGP@sswOrD;MultiSubnetFailover=True;' `
    -FileServiceCacheConnectionString 'Server=aglistener.domain.local;Database=FileServiceCache;User Id=sqladmin;Password=StR0nGP@sswOrD;MultiSubnetFailover=True;' `
    -DataProtectorPath '.\BluePrismDataProtector.Console.exe'

    If you have both Blue Prism Hub and Blue Prism Interact installed and are using Windows authentication:

    Copy
     .\prepare.ps1 `
    -HubCacheConnectionString 'Server=aglistener.domain.local;Database=HubCache;Integrated Security=True;MultiSubnetFailover=True;' `
    -AuthServerCacheConnectionString 'Server=aglistener.domain.local;Database=AuthenticationServerCache;Integrated Security=True;MultiSubnetFailover=True;' `
    -FileServiceCacheConnectionString 'Server=aglistener.domain.local;Database=FileServiceCache;Integrated Security=True;MultiSubnetFailover=True;' `
    -InteractCacheConnectionString 'Server=aglistener.domain.local;Database=InteractCache;Integrated Security=True;MultiSubnetFailover=True;' `
    -DataProtectorPath '.\BluePrismDataProtector.Console.exe' `
    -IncludeInteract

    If you only have Blue Prism Hub installed and are using Windows authentication:

    Copy
     .\prepare.ps1 `
    -HubCacheConnectionString 'Server=aglistener.domain.local;Database=HubCache;Integrated Security=True;MultiSubnetFailover=True;' `
    -AuthServerCacheConnectionString 'Server=aglistener.domain.local;Database=AuthenticationServerCache;Integrated Security=True;MultiSubnetFailover=True;' `
    -FileServiceCacheConnectionString 'Server=aglistener.domain.local;Database=FileServiceCache;Integrated Security=True;MultiSubnetFailover=True;' `
    -DataProtectorPath '.\BluePrismDataProtector.Console.exe'

    After running the prepare.ps1 script you will have:

    • A Files folder with compressed application content, certificates, and registry files, is now stored in the Scripts folder.
    • A variables.json file in the Scripts folder with all values needed for each script.
  3. Copy the entire Scripts folder on the initial web server host to each additional web server host using the same directory structure, for example, C:\Scripts.

    See Setup.ps1 script for the next step.