Code Sign Client Distribution Script Guide
Symptom
Code Sign Client Distribution Script Guide
Introduction
This guide provides instructions for server administrators on how to use the ClientDistribution.ps1 PowerShell script to update their Code Sign Manager Trust Protection Foundation (TPF) servers to the newest Client version. The script can help automate the process of downloading client software packages for all supported architectures, making it easier to roll out newer client versions to existing servers.
Key Features
- Download client files for each architecture available.
- Supports specifying a particular client version or defaults to the latest available.
- Allows listing all available client versions.
- Provides options to force overwriting existing files and to update "latest" file references.
Parameters
|
Parameter |
Description |
|
-Version |
(Optional) Specifies the client version to download. Defaults to the most recent version if not specified. |
|
-Destination |
(Optional) Path to save the downloaded files. Defaults to the TPF instance’s clients folder or C:\temp. |
|
-ListVersions |
(Switch) Lists all available client versions and exits. |
|
-ForcePull |
(Switch) Always download and overwrite files, even if they already exist. |
|
-ForceLatestRename |
(Switch) Replaces existing files named "latest" with the newly downloaded ones. |
Usage Examples
Download the Latest Client Files to the Default Location
.\ClientDistribution.ps1
Download a Specific Version to a Custom Directory
.\ClientDistribution.ps1 -Destination 'C:\temp' -Version 25.12.30.1
Get All Available Client Versions
.\ClientDistribution.ps1 -ListVersions
Combine Both Force Flags for a Complete Upgrade Rollout
.\ClientDistribution.ps1 -ForcePull -ForceLatestRename
Steps for Installing the Newest Version to the Default Location on a TPF Server
- Open PowerShell as Administrator:
- Right-click on the PowerShell icon and select "Run as Administrator".
- Navigate to the Directory Containing the Script:
- Use the cd command to change to the directory where ClientDistribution.ps1 is located. For example:
- cd C:\Path\To\Script
- Run the Script to Download the Latest Client Files:
- Execute the following command to download the latest client files to the default location:
- .\ClientDistribution.ps1 -ForcePull -ForceLatestRename
- Verify the Downloaded Files:
- Check the default destination directory (e.g., C:\Program Files\Venafi\Web\ClientDistribution\clients) to ensure that the client files have been downloaded and updated correctly.
Important Notes for Upgrading Clients
- When rolling out newer client versions, use the -ForcePull and -ForceLatestRename flags.
- -ForcePull ensures that all files are downloaded and existing files are overwritten, preventing version mismatches.
- -ForceLatestRename ensures that any files named "latest" are updated to point to the new version, which is critical for environments that rely on the "latest" symlink or file reference.
- After downloading, if not running on the TPF server, manually move the files to the C:\Program Files\Venafi\Web\ClientDistribution\clients directory on the TPF host.
- The script always places the latest *.json files in the destination. It would be good to back the initial files up in case the need to roll back appears.
Troubleshooting
- If you specify a version that does not exist, the script will list all available versions for you to choose from.
- Make sure that the system running the script can reach venafi.cloud to download the necessary files.
- Ensure you have the necessary permission to write to the destination directory.
- If client has problems fetching versions, ensure that the IUSR (IIS Anonymous Auth User) has view permissions on the files.
- If the default or defined folder does not exist, the script will fail.
For further details, review the script's inline documentation or contact Idira Customer Support.
Environment
25.1;25.3 TPP/TLSPDC Code Signing