Updated on 2024-11-13 GMT+08:00

Running PowerShell Scripts Failed

Symptoms

The error message "module_stderr": "Test-Path : Cannot bind argument to parameter 'Path' because it is an empty str\r\ning. is displayed.

Cause Analysis

The action Run PowerShell Script uses Ansible for deployment, but the Windows path uses backslashes (\), not forward slashes (/).

Solution

Check the entered path and ensure that the path uses forward slashes (/).