From e65fd798c02a214972ad6fca3d0575263465ca4b Mon Sep 17 00:00:00 2001 From: Sean Wheeler Date: Tue, 29 Jul 2025 10:30:37 -0500 Subject: [PATCH] Correct the description of Run with PowerShell feature (#12249) --- .../About/about_Run_With_PowerShell.md | 54 ++++++++++--------- .../About/about_Run_With_PowerShell.md | 54 ++++++++++--------- .../About/about_Run_With_PowerShell.md | 54 ++++++++++--------- .../ConvertFrom-SddlString.md | 2 +- .../About/about_Run_With_PowerShell.md | 54 ++++++++++--------- 5 files changed, 117 insertions(+), 101 deletions(-) diff --git a/reference/5.1/Microsoft.PowerShell.Core/About/about_Run_With_PowerShell.md b/reference/5.1/Microsoft.PowerShell.Core/About/about_Run_With_PowerShell.md index f85e4df0d933..1ae33c8c1fd5 100644 --- a/reference/5.1/Microsoft.PowerShell.Core/About/about_Run_With_PowerShell.md +++ b/reference/5.1/Microsoft.PowerShell.Core/About/about_Run_With_PowerShell.md @@ -1,7 +1,7 @@ --- description: Explains how to use the Run with PowerShell feature to run a script from a file system drive. Locale: en-US -ms.date: 03/06/2024 +ms.date: 07/29/2025 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_run_with_powershell?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0 title: about_Run_With_PowerShell @@ -17,40 +17,44 @@ file system drive. ## Long description Beginning in Windows PowerShell 3.0, you can use the **Run with PowerShell** -feature to run scripts from File Explorer. The **Run with PowerShell** feature -is intended to run scripts that don't have required parameters, don't return -output to console, and don't prompt for user input. When you use the **Run with -PowerShell** feature, the PowerShell console window appears only briefly, if at -all. +feature to run scripts from File Explorer. PowerShell 7 adds the **Run with +PowerShell 7** feature that allows you to run scripts specifically with +PowerShell 7. + +The **Run with PowerShell** feature is intended to run scripts that don't have +parameters, don't return output to console, and don't prompt for user input. + +When you use the **Run with PowerShell** feature, the PowerShell console window +appears only briefly, if at all. To use the **Run with PowerShell** feature: -In File Explorer (or Windows Explorer), right-click the script filename and -then select **Run with PowerShell**. +In File Explorer on Windows, right-click the script filename and then select +**Run with PowerShell** or **Run with PowerShell 7**. Either selection starts a +new PowerShell session, runs the script, and closes the session when the script +exits. -The **Run with PowerShell** feature starts a Windows PowerShell session that -has an execution policy of Bypass, runs the script, and closes the session. +- When you select **Run with PowerShell 7**, the script is invoked using the + following command: -It runs a command that has the following format: + ``` + C:\Program Files\PowerShell\7\pwsh.exe -Command "$host.UI.RawUI.WindowTitle = 'PowerShell 7 (x64)'; & '%1'" + ``` -``` -powershell.exe -File -ExecutionPolicy Bypass -``` +- When you select **Run with PowerShell**, the script is invoked using the + following command: -**Run with PowerShell** sets the Bypass execution policy only for the session -(the current instance of the PowerShell process) in which the script runs. -This feature doesn't change the execution policy for the computer or the -user. + ``` + C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -file "%1" + ``` -The **Run with PowerShell** feature is affected only by the AllSigned execution -policy. If the AllSigned execution policy is effective for the computer or the -user, **Run with PowerShell** runs only signed scripts. **Run with PowerShell** -is not affected by any other execution policy. For more information, see -[about_Execution_Policies][01]. +Your ability to run scripts is subject to the configured execution policy. For +more information, see [about_Execution_Policies][01]. > [!NOTE] -> **Run with PowerShell** feature might prompt you to confirm the execution -> policy change. +> There is a known issue with this feature for PowerShell 7 on Windows 11. Due +> to a change in the context menus on Windows 11, the **Run with PowerShell 7** +> menu item does not appear. This issue is being investigated. ## See also diff --git a/reference/7.4/Microsoft.PowerShell.Core/About/about_Run_With_PowerShell.md b/reference/7.4/Microsoft.PowerShell.Core/About/about_Run_With_PowerShell.md index f20c3b47322f..c499fa7a8e99 100644 --- a/reference/7.4/Microsoft.PowerShell.Core/About/about_Run_With_PowerShell.md +++ b/reference/7.4/Microsoft.PowerShell.Core/About/about_Run_With_PowerShell.md @@ -1,7 +1,7 @@ --- description: Explains how to use the Run with PowerShell feature to run a script from a file system drive. Locale: en-US -ms.date: 03/06/2024 +ms.date: 07/29/2025 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_run_with_powershell?view=powershell-7.4&WT.mc_id=ps-gethelp schema: 2.0.0 title: about_Run_With_PowerShell @@ -17,40 +17,44 @@ file system drive. ## Long description Beginning in Windows PowerShell 3.0, you can use the **Run with PowerShell** -feature to run scripts from File Explorer. The **Run with PowerShell** feature -is intended to run scripts that don't have required parameters, don't return -output to console, and don't prompt for user input. When you use the **Run with -PowerShell** feature, the PowerShell console window appears only briefly, if at -all. +feature to run scripts from File Explorer. PowerShell 7 adds the **Run with +PowerShell 7** feature that allows you to run scripts specifically with +PowerShell 7. + +The **Run with PowerShell** feature is intended to run scripts that don't have +parameters, don't return output to console, and don't prompt for user input. + +When you use the **Run with PowerShell** feature, the PowerShell console window +appears only briefly, if at all. To use the **Run with PowerShell** feature: -In File Explorer (or Windows Explorer), right-click the script filename and -then select **Run with PowerShell**. +In File Explorer on Windows, right-click the script filename and then select +**Run with PowerShell** or **Run with PowerShell 7**. Either selection starts a +new PowerShell session, runs the script, and closes the session when the script +exits. -The **Run with PowerShell** feature starts a Windows PowerShell session that -has an execution policy of Bypass, runs the script, and closes the session. +- When you select **Run with PowerShell 7**, the script is invoked using the + following command: -It runs a command that has the following format: + ``` + C:\Program Files\PowerShell\7\pwsh.exe -Command "$host.UI.RawUI.WindowTitle = 'PowerShell 7 (x64)'; & '%1'" + ``` -``` -pwsh.exe -File -ExecutionPolicy Bypass -``` +- When you select **Run with PowerShell**, the script is invoked using the + following command: -**Run with PowerShell** sets the Bypass execution policy only for the session -(the current instance of the PowerShell process) in which the script runs. -This feature doesn't change the execution policy for the computer or the -user. + ``` + C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -file "%1" + ``` -The **Run with PowerShell** feature is affected only by the AllSigned execution -policy. If the AllSigned execution policy is effective for the computer or the -user, **Run with PowerShell** runs only signed scripts. **Run with PowerShell** -is not affected by any other execution policy. For more information, see -[about_Execution_Policies][01]. +Your ability to run scripts is subject to the configured execution policy. For +more information, see [about_Execution_Policies][01]. > [!NOTE] -> **Run with PowerShell** feature might prompt you to confirm the execution -> policy change. +> There is a known issue with this feature for PowerShell 7 on Windows 11. Due +> to a change in the context menus on Windows 11, the **Run with PowerShell 7** +> menu item does not appear. This issue is being investigated. ## See also diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_Run_With_PowerShell.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_Run_With_PowerShell.md index bea796ca49c1..c25cf9749698 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_Run_With_PowerShell.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_Run_With_PowerShell.md @@ -1,7 +1,7 @@ --- description: Explains how to use the Run with PowerShell feature to run a script from a file system drive. Locale: en-US -ms.date: 03/06/2024 +ms.date: 07/29/2025 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_run_with_powershell?view=powershell-7.5&WT.mc_id=ps-gethelp schema: 2.0.0 title: about_Run_With_PowerShell @@ -17,40 +17,44 @@ file system drive. ## Long description Beginning in Windows PowerShell 3.0, you can use the **Run with PowerShell** -feature to run scripts from File Explorer. The **Run with PowerShell** feature -is intended to run scripts that don't have required parameters, don't return -output to console, and don't prompt for user input. When you use the **Run with -PowerShell** feature, the PowerShell console window appears only briefly, if at -all. +feature to run scripts from File Explorer. PowerShell 7 adds the **Run with +PowerShell 7** feature that allows you to run scripts specifically with +PowerShell 7. + +The **Run with PowerShell** feature is intended to run scripts that don't have +parameters, don't return output to console, and don't prompt for user input. + +When you use the **Run with PowerShell** feature, the PowerShell console window +appears only briefly, if at all. To use the **Run with PowerShell** feature: -In File Explorer (or Windows Explorer), right-click the script filename and -then select **Run with PowerShell**. +In File Explorer on Windows, right-click the script filename and then select +**Run with PowerShell** or **Run with PowerShell 7**. Either selection starts a +new PowerShell session, runs the script, and closes the session when the script +exits. -The **Run with PowerShell** feature starts a Windows PowerShell session that -has an execution policy of Bypass, runs the script, and closes the session. +- When you select **Run with PowerShell 7**, the script is invoked using the + following command: -It runs a command that has the following format: + ``` + C:\Program Files\PowerShell\7\pwsh.exe -Command "$host.UI.RawUI.WindowTitle = 'PowerShell 7 (x64)'; & '%1'" + ``` -``` -pwsh.exe -File -ExecutionPolicy Bypass -``` +- When you select **Run with PowerShell**, the script is invoked using the + following command: -**Run with PowerShell** sets the Bypass execution policy only for the session -(the current instance of the PowerShell process) in which the script runs. -This feature doesn't change the execution policy for the computer or the -user. + ``` + C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -file "%1" + ``` -The **Run with PowerShell** feature is affected only by the AllSigned execution -policy. If the AllSigned execution policy is effective for the computer or the -user, **Run with PowerShell** runs only signed scripts. **Run with PowerShell** -is not affected by any other execution policy. For more information, see -[about_Execution_Policies][01]. +Your ability to run scripts is subject to the configured execution policy. For +more information, see [about_Execution_Policies][01]. > [!NOTE] -> **Run with PowerShell** feature might prompt you to confirm the execution -> policy change. +> There is a known issue with this feature for PowerShell 7 on Windows 11. Due +> to a change in the context menus on Windows 11, the **Run with PowerShell 7** +> menu item does not appear. This issue is being investigated. ## See also diff --git a/reference/7.5/Microsoft.PowerShell.Utility/ConvertFrom-SddlString.md b/reference/7.5/Microsoft.PowerShell.Utility/ConvertFrom-SddlString.md index 2d5d8e93edfb..c5367d927206 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/ConvertFrom-SddlString.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/ConvertFrom-SddlString.md @@ -1,5 +1,5 @@ --- -external help file: Microsoft.PowerShell.Utility-help.xml +external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Utility ms.date: 12/12/2022 diff --git a/reference/7.6/Microsoft.PowerShell.Core/About/about_Run_With_PowerShell.md b/reference/7.6/Microsoft.PowerShell.Core/About/about_Run_With_PowerShell.md index 072aab575859..d52cb05b66fb 100644 --- a/reference/7.6/Microsoft.PowerShell.Core/About/about_Run_With_PowerShell.md +++ b/reference/7.6/Microsoft.PowerShell.Core/About/about_Run_With_PowerShell.md @@ -1,7 +1,7 @@ --- description: Explains how to use the Run with PowerShell feature to run a script from a file system drive. Locale: en-US -ms.date: 03/06/2024 +ms.date: 07/29/2025 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_run_with_powershell?view=powershell-7.6&WT.mc_id=ps-gethelp schema: 2.0.0 title: about_Run_With_PowerShell @@ -17,40 +17,44 @@ file system drive. ## Long description Beginning in Windows PowerShell 3.0, you can use the **Run with PowerShell** -feature to run scripts from File Explorer. The **Run with PowerShell** feature -is intended to run scripts that don't have required parameters, don't return -output to console, and don't prompt for user input. When you use the **Run with -PowerShell** feature, the PowerShell console window appears only briefly, if at -all. +feature to run scripts from File Explorer. PowerShell 7 adds the **Run with +PowerShell 7** feature that allows you to run scripts specifically with +PowerShell 7. + +The **Run with PowerShell** feature is intended to run scripts that don't have +parameters, don't return output to console, and don't prompt for user input. + +When you use the **Run with PowerShell** feature, the PowerShell console window +appears only briefly, if at all. To use the **Run with PowerShell** feature: -In File Explorer (or Windows Explorer), right-click the script filename and -then select **Run with PowerShell**. +In File Explorer on Windows, right-click the script filename and then select +**Run with PowerShell** or **Run with PowerShell 7**. Either selection starts a +new PowerShell session, runs the script, and closes the session when the script +exits. -The **Run with PowerShell** feature starts a Windows PowerShell session that -has an execution policy of Bypass, runs the script, and closes the session. +- When you select **Run with PowerShell 7**, the script is invoked using the + following command: -It runs a command that has the following format: + ``` + C:\Program Files\PowerShell\7\pwsh.exe -Command "$host.UI.RawUI.WindowTitle = 'PowerShell 7 (x64)'; & '%1'" + ``` -``` -pwsh.exe -File -ExecutionPolicy Bypass -``` +- When you select **Run with PowerShell**, the script is invoked using the + following command: -**Run with PowerShell** sets the Bypass execution policy only for the session -(the current instance of the PowerShell process) in which the script runs. -This feature doesn't change the execution policy for the computer or the -user. + ``` + C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -file "%1" + ``` -The **Run with PowerShell** feature is affected only by the AllSigned execution -policy. If the AllSigned execution policy is effective for the computer or the -user, **Run with PowerShell** runs only signed scripts. **Run with PowerShell** -is not affected by any other execution policy. For more information, see -[about_Execution_Policies][01]. +Your ability to run scripts is subject to the configured execution policy. For +more information, see [about_Execution_Policies][01]. > [!NOTE] -> **Run with PowerShell** feature might prompt you to confirm the execution -> policy change. +> There is a known issue with this feature for PowerShell 7 on Windows 11. Due +> to a change in the context menus on Windows 11, the **Run with PowerShell 7** +> menu item does not appear. This issue is being investigated. ## See also