Skip to content

CapaPack Fails with "Powershell 7 must be installed"

A CapaPack fails to install on a computer, and the package log shows this line:

JOBERROR : Powershell 7 must be installed.

The agent retries the job later, but it keeps failing.

CapaPacks that contain an Install.ps1 script in the package kit run that script with the PowerShell 7 that’s installed on the client. The computer doesn’t have PowerShell 7 or later installed as pwsh.exe under C:\Program Files\PowerShell. Windows PowerShell 5.1 isn’t enough.

Upgrading CapaInstaller doesn’t install PowerShell 7 on the clients.

  1. In the CapaInstaller Console, deploy the PowerShell 7 CapaPack to the affected computers. For example, link it to the same groups as the CapaPack that fails.
  2. Check that the PowerShell 7 CapaPack shows as installed on the computers.
  3. Right-click the failed CapaPack on the unit and select Set to waiting to run it again. Or wait for the agent to retry the job.

The CapaPack installs on the computers.

To avoid the error on new computers, deploy the PowerShell 7 CapaPack before other CapaPacks.