Skip to content

Windows Powershell error #13221

@PrzemyslawSwiderski

Description

@PrzemyslawSwiderski

Description

Hi,
I have an issue testing my project with windows runner.
When trying to install PS1 script with: powershell -NoProfile -ExecutionPolicy Bypass -File .\uvInstaller.ps1
I am getting the following error during the build:

> Task :uvSetup FAILED
Installing uv...
The 'Get-ExecutionPolicy' command was found in the module 'Microsoft.PowerShell.Security', but the module could not be loaded. For more information, run 'Import-Module Microsoft.PowerShell.Security'.

When I try to run the tests on my private laptop with Windows 11, the tests are passing.

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 22.04
  • Ubuntu 24.04
  • macOS 13
  • macOS 13 Arm64
  • macOS 14
  • macOS 14 Arm64
  • macOS 15
  • macOS 15 Arm64
  • macOS 26 Arm64
  • Windows Server 2019
  • Windows Server 2022
  • Windows Server 2025

Image version and build link

https://github.com/PrzemyslawSwiderski/python-uv-gradle-plugin/actions/runs/18854509109/job/53798909520?pr=4

Is it regression?

not

Expected behavior

PS1 script is installed and build is passing

Actual behavior

> Task :uvSetup FAILED
Installing uv...
The 'Get-ExecutionPolicy' command was found in the module 'Microsoft.PowerShell.Security', but the module could not be loaded. For more information, run 'Import-Module Microsoft.PowerShell.Security'.

Repro steps

Run ./gradlew build in project and on Windows

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions