Describe the bug
When trying to run a powershell .ps1 script any file (except .bat) on windows, we get an error:
Error: nu::shell::io_error
× I/O error
help: %1 is not a valid Win32 application. (os error 193)
How to reproduce
- create a powershell
.ps1 file containing anything, for example (Get-ChildItem).Count
- try to run it via nushell by calling the file name, for example
./childCount.ps1
- get error
Expected behavior
Run the powershell script and print the output
Screenshots

Configuration
| key |
value |
| version |
0.94.1 |
| major |
0 |
| minor |
94 |
| patch |
1 |
| branch |
|
| commit_hash |
|
| build_os |
windows-x86_64 |
| build_target |
x86_64-pc-windows-msvc |
| rust_version |
rustc 1.78.0 (9b00956e5 2024-04-29) |
| rust_channel |
stable-x86_64-pc-windows-msvc |
| cargo_version |
cargo 1.78.0 (54d8815d0 2024-03-26) |
| build_time |
2024-05-31 15:27:30 +03:00 |
| build_rust_channel |
release |
| allocator |
mimalloc |
| features |
default, sqlite, system-clipboard, trash, which |
| installed_plugins |
|
Additional context
I remember it used to work in some previous nushell version, but I might be wrong
pwsh -f ./childCount.ps1 obviously works
./batscript.bat works
Describe the bug
When trying to run
a powershellany file (except.ps1script.bat) on windows, we get an error:How to reproduce
.ps1file containing anything, for example(Get-ChildItem).Count./childCount.ps1Expected behavior
Run the powershell script and print the output
Screenshots
Configuration
Additional context
I remember it used to work in some previous nushell version, but I might be wrong
pwsh -f ./childCount.ps1obviously works./batscript.batworks