Skip to main content

1E 23.11 (SaaS)

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

Note

You can download the 1E Content Distribution Tools from the Releases page for your platform version at https://support.1e.com/.

To script requires:

  • ContentDistribution version 8.0 or above is installed.

  • Use PowerShell version 5.0 or above.

  • 1E platform has the Nomad consumer provisioned.

  • The account used to run the script must be a platform 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

Note

This platform release requires the 1E Authentication Proxy. This means that when using this script you will need to enter your AuthProxy url when prompted for the PlatformURL.

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