How to validate PowerShell scripts for compatibility with Sitecore PowerShell Extensions 8.0 using a local Docker environment


Overview

This article describes how to validate custom PowerShell scripts for compatibility with Sitecore PowerShell Extensions (SPE) 8.0.

SPE 8.0 includes breaking changes, and any script that is not compatible with the later version may stop functioning after the upgrade. A local Docker environment can be used to emulate the SPE 8.0 behavior for testing purposes.

Description

SPE 8.0 introduces updates to script execution, UI behavior, and internal APIs. Because the hosted SitecoreAI environment cannot run SPE 8.0 before the global rollout, local validation is required.

A local environment based on xmcloud‑starter‑js can be configured to apply SPE 8.0 override files and reproduce the new behavior. The update‑spe‑local.ps1 script copies SPE 8.0 artifacts into the running CM container, removes obsolete files, and restarts the instance to ensure that the overrides take effect.

This local setup enables earlier detection of incompatible script logic, API calls, or UI dependencies affected by the breaking changes introduced in SPE 8.0.

Validation

The validation workflow consists of the following high-level actions:

Note: This procedure modifies a local CM container only. It does not affect hosted SitecoreAI environments. This approach allows early detection and remediation of breaking changes. All detailed steps for preparing the local environment and running the script are documented in the README file.