diff --git a/hyperv/tools/hypestv/src/windows/hyperv.rs b/hyperv/tools/hypestv/src/windows/hyperv.rs index eafb0cad34..7570221ea6 100644 --- a/hyperv/tools/hypestv/src/windows/hyperv.rs +++ b/hyperv/tools/hypestv/src/windows/hyperv.rs @@ -45,7 +45,7 @@ pub fn hvc_output( } pub fn powershell_script(script: &str, args: &[&str]) -> anyhow::Result { - let mut cmd = std::process::Command::new("powershell.exe"); + let mut cmd = std::process::Command::new("pwsh.exe"); cmd.arg("-NoProfile") .arg("-Command") .arg(format!("&{{{script}}}")) diff --git a/support/powershell_builder/src/lib.rs b/support/powershell_builder/src/lib.rs index 02591ac264..4a16b96084 100644 --- a/support/powershell_builder/src/lib.rs +++ b/support/powershell_builder/src/lib.rs @@ -21,7 +21,7 @@ pub struct PowerShellBuilder(Command); impl PowerShellBuilder { /// Create a new PowerShell command pub fn new() -> Self { - PowerShellCmdletBuilder(Command::new("powershell.exe")) + PowerShellCmdletBuilder(Command::new("pwsh.exe")) .flag("NoProfile") .finish() }