Bahex 6906a0ca50
fix: implicitly running .ps1 scripts with spaces in path (#15781)
- this PR should close #15757

# Description

> [!NOTE]
> [`-File <filePath>
<args>`](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_powershell_exe?view=powershell-5.1#-file----filepath-args)
> - Enter the script filepath and any parameters
> - All values typed after the File parameter are interpreted as the
script filepath and parameters passed to that script.

> [!NOTE]
>
[`-Command`](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_powershell_exe?view=powershell-5.1#-command)
> - The value of Command can be -, a _script block_, or a _string_.
> - In `cmd.exe` (and other externall callers), there is no such thing
as a _script block_, so the value passed to Command is always a
_**string**_.
> - A string passed to Command is still executed as PowerShell code.

> [!NOTE]
> [Call operator
`&`](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_operators?view=powershell-5.1#call-operator-)
> - Runs a command, ***script***, or script block.

Basically using `-Command` to run scripts would require _another_ layer
of quoting and escaping. It looks like `-File` is the way to run
powershell scripts as an external caller.

# User-Facing Changes

# Tests + Formatting

# After Submitting

Co-authored-by: Bahex <17417311+Bahex@users.noreply.github.com>
2025-05-21 14:47:26 -05:00
..
2025-05-13 16:49:30 +02:00
2025-05-13 16:49:30 +02:00
2025-05-13 16:49:30 +02:00
2022-11-22 16:58:11 -08:00
2025-05-13 16:49:30 +02:00
2025-02-10 15:32:05 +08:00
2024-05-23 02:05:27 +00:00
2024-05-23 02:05:27 +00:00
2025-05-13 16:49:30 +02:00
2025-05-13 16:49:30 +02:00
2025-05-13 16:49:30 +02:00
2023-10-24 12:48:05 -05:00
2025-05-13 16:49:30 +02:00
2025-04-01 07:17:05 -05:00
2025-05-13 16:49:30 +02:00
2024-10-11 06:43:12 -05:00
2025-02-06 06:56:30 -06:00
2025-05-13 16:49:30 +02:00
2025-05-13 16:49:30 +02:00
2025-05-13 16:49:30 +02:00
2025-01-04 16:41:03 -05:00
2025-05-13 16:49:30 +02:00
2025-05-13 16:49:30 +02:00
2025-04-26 23:24:35 +08:00
2025-05-13 16:49:30 +02:00
2025-05-13 16:49:30 +02:00
2025-05-13 16:49:30 +02:00
2024-12-18 06:36:04 -06:00
2025-05-13 16:49:30 +02:00
2025-05-13 16:49:30 +02:00
2025-05-13 16:49:30 +02:00
2025-05-13 16:49:30 +02:00
2025-05-13 16:49:30 +02:00
2025-05-13 16:49:30 +02:00
2025-05-13 16:49:30 +02:00
2023-04-28 13:25:44 +02:00
2025-05-13 16:49:30 +02:00
2025-05-13 16:49:30 +02:00
2023-04-28 13:25:44 +02:00
2025-05-13 16:49:30 +02:00
2025-05-13 16:49:30 +02:00
2025-05-13 16:49:30 +02:00
2025-05-13 16:49:30 +02:00
2025-05-13 16:49:30 +02:00
2024-05-03 08:36:10 +08:00
2025-05-13 16:49:30 +02:00
2025-05-13 16:49:30 +02:00
2025-05-13 16:49:30 +02:00
2025-05-13 16:49:30 +02:00