Skip to main content

1E 8.1 (on-premises)

Content Distribution purge configuration script

Sample script to view or update Purge Configuration in the Content Distribution Service defined in the ContentDistribution PurgeSettings table if it is configured.

Prerequisites

The CDPurgeSettings.ps1 script is available from the Scripts folder in the NomadBranch download zip. You can download this zip by clicking on the Nomad Tools link in the 1E Support Portal at 1eportal.force.com/s/article/Nomad81.

To script requires:

  • ContentDistribution version 8.0 or above is installed

  • Use PowerShell version 5.0 or above

  • Tachyon platform has the Nomad consumer provisioned

  • The account used to run the script must be a Tachyon user with the Nomad Administrator role assigned

Using the example Content Distribution purge configuration script

Parameters

The script uses the following parameters:

Parameter

Required

Description

CDServer

Mandatory

The hostname or FQDN of the CD server, as needed in your environment.

Get

Optional

Include this switch to view the existing purge configuration. One of the switch from "-Get" and "-Update" should be specified.

Update

Optional

Include this switch to update the existing purge configuration. If this switch is enabled, the other 2 switches should also be enabled -PurgeSchedule_HoursIn24HrFormat and -PurgeSchedule_Minutes.

PurgeSchedule_HoursIn24HrFormat

Mandatory in case of -Update switch else optional.

It can take the value between 0-23 (inclusive).

PurgeSchedule_Minutes

Mandatory in case of -Update switch else optional.

It can take the value between 0-59 (inclusive).

Tls12

Optional

Include this switch if TLS 1.2 is enabled.

Protocol

Optional

The protocol for connecting to the server, either HTTP or HTTPS. By default, it is HTTPs.

Example PowerShell command lines

The CDPurgeSettings.ps1 script can be run on a PowerShell command line as shown in the following examples, where tachyon.1etrn.local is the PlatformURL for our sample environment:

View the existing Purge configuration with HTTPS protocol and Get switch:

.\CDPurgeSettings.ps1 -Get -Protocol https -CDServer tachyon.1etrn.local:443

Update the existing purge configuration with HTTP protocol with confirmation:

.\CDPurgeSettings.ps1 -Update -PurgeSchedule_HoursIn24HrFormat 20 -PurgeSchedule_Minutes 10 -Protocol http -CDServer tachyon.1etrn.local:80

Update the existing purge configuration with HTTPS protocol with confirmation:

.\CDPurgeSettings.ps1 -Update -PurgeSchedule_HoursIn24HrFormat 20 -PurgeSchedule_Minutes 10 -Protocol https -CDServer tachyon.1etrn.local:443

Update the existing purge configuration with HTTP protocol and tls12 support:

.\CDPurgeSettings.ps1 -Update -PurgeSchedule_HoursIn24HrFormat 20 -PurgeSchedule_Minutes 10 -Protocol http -Tls12 -CDServer tachyon.1etrn.local:80