Skip to content

Commit 5e08156

Browse files
committed
Correct the description of Run with PowerShell feature
1 parent d072917 commit 5e08156

File tree

5 files changed

+117
-101
lines changed

5 files changed

+117
-101
lines changed

reference/5.1/Microsoft.PowerShell.Core/About/about_Run_With_PowerShell.md

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Explains how to use the Run with PowerShell feature to run a script from a file system drive.
33
Locale: en-US
4-
ms.date: 03/06/2024
4+
ms.date: 07/29/2025
55
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
66
schema: 2.0.0
77
title: about_Run_With_PowerShell
@@ -17,40 +17,44 @@ file system drive.
1717
## Long description
1818

1919
Beginning in Windows PowerShell 3.0, you can use the **Run with PowerShell**
20-
feature to run scripts from File Explorer. The **Run with PowerShell** feature
21-
is intended to run scripts that don't have required parameters, don't return
22-
output to console, and don't prompt for user input. When you use the **Run with
23-
PowerShell** feature, the PowerShell console window appears only briefly, if at
24-
all.
20+
feature to run scripts from File Explorer. PowerShell 7 adds the **Run with
21+
PowerShell 7** feature that allows you to run scripts specifically with
22+
PowerShell 7.
23+
24+
The **Run with PowerShell** feature is intended to run scripts that don't have
25+
parameters, don't return output to console, and don't prompt for user input.
26+
27+
When you use the **Run with PowerShell** feature, the PowerShell console window
28+
appears only briefly, if at all.
2529

2630
To use the **Run with PowerShell** feature:
2731

28-
In File Explorer (or Windows Explorer), right-click the script filename and
29-
then select **Run with PowerShell**.
32+
In File Explorer on Windows, right-click the script filename and then select
33+
**Run with PowerShell** or **Run with PowerShell 7**. Either selection starts a
34+
new PowerShell session, runs the script, and closes the session when the script
35+
exits.
3036

31-
The **Run with PowerShell** feature starts a Windows PowerShell session that
32-
has an execution policy of Bypass, runs the script, and closes the session.
37+
- When you select **Run with PowerShell 7**, the script is invoked using the
38+
following command:
3339

34-
It runs a command that has the following format:
40+
```
41+
C:\Program Files\PowerShell\7\pwsh.exe -Command "$host.UI.RawUI.WindowTitle = 'PowerShell 7 (x64)'; & '%1'"
42+
```
3543

36-
```
37-
powershell.exe -File <FileName> -ExecutionPolicy Bypass
38-
```
44+
- When you select **Run with PowerShell**, the script is invoked using the
45+
following command:
3946

40-
**Run with PowerShell** sets the Bypass execution policy only for the session
41-
(the current instance of the PowerShell process) in which the script runs.
42-
This feature doesn't change the execution policy for the computer or the
43-
user.
47+
```
48+
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -file "%1"
49+
```
4450

45-
The **Run with PowerShell** feature is affected only by the AllSigned execution
46-
policy. If the AllSigned execution policy is effective for the computer or the
47-
user, **Run with PowerShell** runs only signed scripts. **Run with PowerShell**
48-
is not affected by any other execution policy. For more information, see
49-
[about_Execution_Policies][01].
51+
Your ability to run scripts is subject to the configured execution policy. For
52+
more information, see [about_Execution_Policies][01].
5053

5154
> [!NOTE]
52-
> **Run with PowerShell** feature might prompt you to confirm the execution
53-
> policy change.
55+
> There is a known issue with this feature for PowerShell 7 on Windows 11. Due
56+
> to a change in the context menus on Windows 11, the **Run with PowerShell 7**
57+
> menu item does not appear. This issue is being investigated.
5458
5559
## See also
5660

reference/7.4/Microsoft.PowerShell.Core/About/about_Run_With_PowerShell.md

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Explains how to use the Run with PowerShell feature to run a script from a file system drive.
33
Locale: en-US
4-
ms.date: 03/06/2024
4+
ms.date: 07/29/2025
55
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
66
schema: 2.0.0
77
title: about_Run_With_PowerShell
@@ -17,40 +17,44 @@ file system drive.
1717
## Long description
1818

1919
Beginning in Windows PowerShell 3.0, you can use the **Run with PowerShell**
20-
feature to run scripts from File Explorer. The **Run with PowerShell** feature
21-
is intended to run scripts that don't have required parameters, don't return
22-
output to console, and don't prompt for user input. When you use the **Run with
23-
PowerShell** feature, the PowerShell console window appears only briefly, if at
24-
all.
20+
feature to run scripts from File Explorer. PowerShell 7 adds the **Run with
21+
PowerShell 7** feature that allows you to run scripts specifically with
22+
PowerShell 7.
23+
24+
The **Run with PowerShell** feature is intended to run scripts that don't have
25+
parameters, don't return output to console, and don't prompt for user input.
26+
27+
When you use the **Run with PowerShell** feature, the PowerShell console window
28+
appears only briefly, if at all.
2529

2630
To use the **Run with PowerShell** feature:
2731

28-
In File Explorer (or Windows Explorer), right-click the script filename and
29-
then select **Run with PowerShell**.
32+
In File Explorer on Windows, right-click the script filename and then select
33+
**Run with PowerShell** or **Run with PowerShell 7**. Either selection starts a
34+
new PowerShell session, runs the script, and closes the session when the script
35+
exits.
3036

31-
The **Run with PowerShell** feature starts a Windows PowerShell session that
32-
has an execution policy of Bypass, runs the script, and closes the session.
37+
- When you select **Run with PowerShell 7**, the script is invoked using the
38+
following command:
3339

34-
It runs a command that has the following format:
40+
```
41+
C:\Program Files\PowerShell\7\pwsh.exe -Command "$host.UI.RawUI.WindowTitle = 'PowerShell 7 (x64)'; & '%1'"
42+
```
3543

36-
```
37-
pwsh.exe -File <FileName> -ExecutionPolicy Bypass
38-
```
44+
- When you select **Run with PowerShell**, the script is invoked using the
45+
following command:
3946

40-
**Run with PowerShell** sets the Bypass execution policy only for the session
41-
(the current instance of the PowerShell process) in which the script runs.
42-
This feature doesn't change the execution policy for the computer or the
43-
user.
47+
```
48+
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -file "%1"
49+
```
4450

45-
The **Run with PowerShell** feature is affected only by the AllSigned execution
46-
policy. If the AllSigned execution policy is effective for the computer or the
47-
user, **Run with PowerShell** runs only signed scripts. **Run with PowerShell**
48-
is not affected by any other execution policy. For more information, see
49-
[about_Execution_Policies][01].
51+
Your ability to run scripts is subject to the configured execution policy. For
52+
more information, see [about_Execution_Policies][01].
5053

5154
> [!NOTE]
52-
> **Run with PowerShell** feature might prompt you to confirm the execution
53-
> policy change.
55+
> There is a known issue with this feature for PowerShell 7 on Windows 11. Due
56+
> to a change in the context menus on Windows 11, the **Run with PowerShell 7**
57+
> menu item does not appear. This issue is being investigated.
5458
5559
## See also
5660

reference/7.5/Microsoft.PowerShell.Core/About/about_Run_With_PowerShell.md

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Explains how to use the Run with PowerShell feature to run a script from a file system drive.
33
Locale: en-US
4-
ms.date: 03/06/2024
4+
ms.date: 07/29/2025
55
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
66
schema: 2.0.0
77
title: about_Run_With_PowerShell
@@ -17,40 +17,44 @@ file system drive.
1717
## Long description
1818

1919
Beginning in Windows PowerShell 3.0, you can use the **Run with PowerShell**
20-
feature to run scripts from File Explorer. The **Run with PowerShell** feature
21-
is intended to run scripts that don't have required parameters, don't return
22-
output to console, and don't prompt for user input. When you use the **Run with
23-
PowerShell** feature, the PowerShell console window appears only briefly, if at
24-
all.
20+
feature to run scripts from File Explorer. PowerShell 7 adds the **Run with
21+
PowerShell 7** feature that allows you to run scripts specifically with
22+
PowerShell 7.
23+
24+
The **Run with PowerShell** feature is intended to run scripts that don't have
25+
parameters, don't return output to console, and don't prompt for user input.
26+
27+
When you use the **Run with PowerShell** feature, the PowerShell console window
28+
appears only briefly, if at all.
2529

2630
To use the **Run with PowerShell** feature:
2731

28-
In File Explorer (or Windows Explorer), right-click the script filename and
29-
then select **Run with PowerShell**.
32+
In File Explorer on Windows, right-click the script filename and then select
33+
**Run with PowerShell** or **Run with PowerShell 7**. Either selection starts a
34+
new PowerShell session, runs the script, and closes the session when the script
35+
exits.
3036

31-
The **Run with PowerShell** feature starts a Windows PowerShell session that
32-
has an execution policy of Bypass, runs the script, and closes the session.
37+
- When you select **Run with PowerShell 7**, the script is invoked using the
38+
following command:
3339

34-
It runs a command that has the following format:
40+
```
41+
C:\Program Files\PowerShell\7\pwsh.exe -Command "$host.UI.RawUI.WindowTitle = 'PowerShell 7 (x64)'; & '%1'"
42+
```
3543

36-
```
37-
pwsh.exe -File <FileName> -ExecutionPolicy Bypass
38-
```
44+
- When you select **Run with PowerShell**, the script is invoked using the
45+
following command:
3946

40-
**Run with PowerShell** sets the Bypass execution policy only for the session
41-
(the current instance of the PowerShell process) in which the script runs.
42-
This feature doesn't change the execution policy for the computer or the
43-
user.
47+
```
48+
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -file "%1"
49+
```
4450

45-
The **Run with PowerShell** feature is affected only by the AllSigned execution
46-
policy. If the AllSigned execution policy is effective for the computer or the
47-
user, **Run with PowerShell** runs only signed scripts. **Run with PowerShell**
48-
is not affected by any other execution policy. For more information, see
49-
[about_Execution_Policies][01].
51+
Your ability to run scripts is subject to the configured execution policy. For
52+
more information, see [about_Execution_Policies][01].
5053

5154
> [!NOTE]
52-
> **Run with PowerShell** feature might prompt you to confirm the execution
53-
> policy change.
55+
> There is a known issue with this feature for PowerShell 7 on Windows 11. Due
56+
> to a change in the context menus on Windows 11, the **Run with PowerShell 7**
57+
> menu item does not appear. This issue is being investigated.
5458
5559
## See also
5660

reference/7.5/Microsoft.PowerShell.Utility/ConvertFrom-SddlString.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
external help file: Microsoft.PowerShell.Utility-help.xml
2+
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Utility
55
ms.date: 12/12/2022

reference/7.6/Microsoft.PowerShell.Core/About/about_Run_With_PowerShell.md

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Explains how to use the Run with PowerShell feature to run a script from a file system drive.
33
Locale: en-US
4-
ms.date: 03/06/2024
4+
ms.date: 07/29/2025
55
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
66
schema: 2.0.0
77
title: about_Run_With_PowerShell
@@ -17,40 +17,44 @@ file system drive.
1717
## Long description
1818

1919
Beginning in Windows PowerShell 3.0, you can use the **Run with PowerShell**
20-
feature to run scripts from File Explorer. The **Run with PowerShell** feature
21-
is intended to run scripts that don't have required parameters, don't return
22-
output to console, and don't prompt for user input. When you use the **Run with
23-
PowerShell** feature, the PowerShell console window appears only briefly, if at
24-
all.
20+
feature to run scripts from File Explorer. PowerShell 7 adds the **Run with
21+
PowerShell 7** feature that allows you to run scripts specifically with
22+
PowerShell 7.
23+
24+
The **Run with PowerShell** feature is intended to run scripts that don't have
25+
parameters, don't return output to console, and don't prompt for user input.
26+
27+
When you use the **Run with PowerShell** feature, the PowerShell console window
28+
appears only briefly, if at all.
2529

2630
To use the **Run with PowerShell** feature:
2731

28-
In File Explorer (or Windows Explorer), right-click the script filename and
29-
then select **Run with PowerShell**.
32+
In File Explorer on Windows, right-click the script filename and then select
33+
**Run with PowerShell** or **Run with PowerShell 7**. Either selection starts a
34+
new PowerShell session, runs the script, and closes the session when the script
35+
exits.
3036

31-
The **Run with PowerShell** feature starts a Windows PowerShell session that
32-
has an execution policy of Bypass, runs the script, and closes the session.
37+
- When you select **Run with PowerShell 7**, the script is invoked using the
38+
following command:
3339

34-
It runs a command that has the following format:
40+
```
41+
C:\Program Files\PowerShell\7\pwsh.exe -Command "$host.UI.RawUI.WindowTitle = 'PowerShell 7 (x64)'; & '%1'"
42+
```
3543

36-
```
37-
pwsh.exe -File <FileName> -ExecutionPolicy Bypass
38-
```
44+
- When you select **Run with PowerShell**, the script is invoked using the
45+
following command:
3946

40-
**Run with PowerShell** sets the Bypass execution policy only for the session
41-
(the current instance of the PowerShell process) in which the script runs.
42-
This feature doesn't change the execution policy for the computer or the
43-
user.
47+
```
48+
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -file "%1"
49+
```
4450

45-
The **Run with PowerShell** feature is affected only by the AllSigned execution
46-
policy. If the AllSigned execution policy is effective for the computer or the
47-
user, **Run with PowerShell** runs only signed scripts. **Run with PowerShell**
48-
is not affected by any other execution policy. For more information, see
49-
[about_Execution_Policies][01].
51+
Your ability to run scripts is subject to the configured execution policy. For
52+
more information, see [about_Execution_Policies][01].
5053

5154
> [!NOTE]
52-
> **Run with PowerShell** feature might prompt you to confirm the execution
53-
> policy change.
55+
> There is a known issue with this feature for PowerShell 7 on Windows 11. Due
56+
> to a change in the context menus on Windows 11, the **Run with PowerShell 7**
57+
> menu item does not appear. This issue is being investigated.
5458
5559
## See also
5660

0 commit comments

Comments
 (0)