Skip to content

Commit 1713dec

Browse files
jhribalsdwheeler
andauthored
Replaced Registry with configuration files in about_Execution_Policies (#11443)
* 7.5 Replaced registry with config files in about_Execution_Policies.md * 7.4 Replaced registry with config files in about_Execution_Policies.md * 7.2 Replaced registry with config files in about_Execution_Policies.md * Formatting --------- Co-authored-by: Sean Wheeler <[email protected]>
1 parent bb66372 commit 1713dec

File tree

4 files changed

+35
-35
lines changed

4 files changed

+35
-35
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Describes the PowerShell execution policies and explains how to manage them.
33
Locale: en-US
4-
ms.date: 05/16/2024
4+
ms.date: 10/07/2024
55
no-loc: [Bypass, Default, Restricted, Undefined, Unrestricted, Process, Scope, MachinePolicy, about_Group_Policy_Settings]
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-5.1&WT.mc_id=ps-gethelp
77
schema: 2.0.0

reference/7.2/Microsoft.PowerShell.Core/About/about_Execution_Policies.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Describes the PowerShell execution policies and explains how to manage them.
33
Locale: en-US
4-
ms.date: 03/04/2024
4+
ms.date: 10/07/2024
55
no-loc: [Bypass, Default, Restricted, Undefined, Unrestricted, Process, Scope, MachinePolicy, about_Group_Policy_Settings]
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.2&WT.mc_id=ps-gethelp
77
schema: 2.0.0
@@ -25,9 +25,9 @@ for the current user, or for a particular session. You can also use a Group
2525
Policy setting to set execution policies for computers and users.
2626

2727
Execution policies for the local computer and current user are stored in the
28-
registry. You don't need to set execution policies in your PowerShell profile.
29-
The execution policy for a particular session is stored only in memory and is
30-
lost when the session is closed.
28+
PowerShell configuration files. You don't need to set execution policies in
29+
your PowerShell profile. The execution policy for a particular session is
30+
stored only in memory and is lost when the session is closed.
3131

3232
The execution policy isn't a security system that restricts user actions. For
3333
example, users can easily bypass a policy by typing the script contents at
@@ -137,18 +137,18 @@ execution policies are as follows:
137137

138138
The **Process** scope only affects the current PowerShell session. The
139139
execution policy is saved in the environment variable
140-
`$env:PSExecutionPolicyPreference`, rather than the registry. When the
141-
PowerShell session is closed, the variable and value are deleted.
140+
`$env:PSExecutionPolicyPreference`, rather than the configuration file. When
141+
the PowerShell session is closed, the variable and value are deleted.
142142

143143
- CurrentUser
144144

145145
The execution policy affects only the current user. It's stored in the
146-
**HKEY_CURRENT_USER** registry subkey.
146+
**CurrentUser** configuration file.
147147

148148
- LocalMachine
149149

150150
The execution policy affects all users on the current computer. It's stored
151-
in the **HKEY_LOCAL_MACHINE** registry subkey.
151+
in the **AllUsers** configuration file.
152152

153153
## Managing the execution policy with PowerShell
154154

@@ -201,11 +201,11 @@ To change the PowerShell execution policy on your Windows computer, use the
201201
need to restart PowerShell.
202202

203203
If you set the execution policy for the scopes **LocalMachine** or the
204-
**CurrentUser**, the change is saved in the registry and remains effective
204+
**CurrentUser**, the change is saved in the configuration file and remains effective
205205
until you change it again.
206206

207207
If you set the execution policy for the **Process** scope, it's not saved in
208-
the registry. The execution policy is retained until the current process and
208+
the configuration file. The execution policy is retained until the current process and
209209
any child processes are closed.
210210

211211
> [!NOTE]
@@ -280,13 +280,13 @@ For example:
280280
pwsh.exe -ExecutionPolicy AllSigned
281281
```
282282

283-
The execution policy that you set isn't stored in the registry. Instead, it's
283+
The execution policy that you set isn't stored in the configuration file. Instead, it's
284284
stored in the `$env:PSExecutionPolicyPreference` environment variable. The
285285
variable is deleted when you close the session in which the policy is set. You
286286
cannot change the policy by editing the variable value.
287287

288288
During the session, the execution policy that is set for the session takes
289-
precedence over an execution policy that is set in the registry for the local
289+
precedence over an execution policy that is set in the configuration file for the local
290290
computer or current user. However, it doesn't take precedence over the
291291
execution policy set by using a Group Policy.
292292

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Describes the PowerShell execution policies and explains how to manage them.
33
Locale: en-US
4-
ms.date: 03/04/2024
4+
ms.date: 10/07/2024
55
no-loc: [Bypass, Default, Restricted, Undefined, Unrestricted, Process, Scope, MachinePolicy, about_Group_Policy_Settings]
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.4&WT.mc_id=ps-gethelp
77
schema: 2.0.0
@@ -25,9 +25,9 @@ for the current user, or for a particular session. You can also use a Group
2525
Policy setting to set execution policies for computers and users.
2626

2727
Execution policies for the local computer and current user are stored in the
28-
registry. You don't need to set execution policies in your PowerShell profile.
29-
The execution policy for a particular session is stored only in memory and is
30-
lost when the session is closed.
28+
PowerShell configuration files. You don't need to set execution policies in
29+
your PowerShell profile. The execution policy for a particular session is
30+
stored only in memory and is lost when the session is closed.
3131

3232
The execution policy isn't a security system that restricts user actions. For
3333
example, users can easily bypass a policy by typing the script contents at
@@ -137,18 +137,18 @@ execution policies are as follows:
137137

138138
The **Process** scope only affects the current PowerShell session. The
139139
execution policy is saved in the environment variable
140-
`$env:PSExecutionPolicyPreference`, rather than the registry. When the
140+
`$env:PSExecutionPolicyPreference`, rather than the configuration file. When the
141141
PowerShell session is closed, the variable and value are deleted.
142142

143143
- CurrentUser
144144

145145
The execution policy affects only the current user. It's stored in the
146-
**HKEY_CURRENT_USER** registry subkey.
146+
**CurrentUser** configuration file.
147147

148148
- LocalMachine
149149

150150
The execution policy affects all users on the current computer. It's stored
151-
in the **HKEY_LOCAL_MACHINE** registry subkey.
151+
in the **AllUsers** configuration file.
152152

153153
## Managing the execution policy with PowerShell
154154

@@ -201,11 +201,11 @@ To change the PowerShell execution policy on your Windows computer, use the
201201
need to restart PowerShell.
202202

203203
If you set the execution policy for the scopes **LocalMachine** or the
204-
**CurrentUser**, the change is saved in the registry and remains effective
204+
**CurrentUser**, the change is saved in the configuration file and remains effective
205205
until you change it again.
206206

207207
If you set the execution policy for the **Process** scope, it's not saved in
208-
the registry. The execution policy is retained until the current process and
208+
the configuration file. The execution policy is retained until the current process and
209209
any child processes are closed.
210210

211211
> [!NOTE]
@@ -280,13 +280,13 @@ For example:
280280
pwsh.exe -ExecutionPolicy AllSigned
281281
```
282282

283-
The execution policy that you set isn't stored in the registry. Instead, it's
283+
The execution policy that you set isn't stored in the configuration file. Instead, it's
284284
stored in the `$env:PSExecutionPolicyPreference` environment variable. The
285285
variable is deleted when you close the session in which the policy is set. You
286286
cannot change the policy by editing the variable value.
287287

288288
During the session, the execution policy that is set for the session takes
289-
precedence over an execution policy that is set in the registry for the local
289+
precedence over an execution policy that is set in the configuration file for the local
290290
computer or current user. However, it doesn't take precedence over the
291291
execution policy set by using a Group Policy.
292292

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Describes the PowerShell execution policies and explains how to manage them.
33
Locale: en-US
4-
ms.date: 03/04/2024
4+
ms.date: 10/07/2024
55
no-loc: [Bypass, Default, Restricted, Undefined, Unrestricted, Process, Scope, MachinePolicy, about_Group_Policy_Settings]
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.5&WT.mc_id=ps-gethelp
77
schema: 2.0.0
@@ -25,9 +25,9 @@ for the current user, or for a particular session. You can also use a Group
2525
Policy setting to set execution policies for computers and users.
2626

2727
Execution policies for the local computer and current user are stored in the
28-
registry. You don't need to set execution policies in your PowerShell profile.
29-
The execution policy for a particular session is stored only in memory and is
30-
lost when the session is closed.
28+
PowerShell configuration files. You don't need to set execution policies in
29+
your PowerShell profile. The execution policy for a particular session is
30+
stored only in memory and is lost when the session is closed.
3131

3232
The execution policy isn't a security system that restricts user actions. For
3333
example, users can easily bypass a policy by typing the script contents at
@@ -137,18 +137,18 @@ execution policies are as follows:
137137

138138
The **Process** scope only affects the current PowerShell session. The
139139
execution policy is saved in the environment variable
140-
`$env:PSExecutionPolicyPreference`, rather than the registry. When the
140+
`$env:PSExecutionPolicyPreference`, rather than the configuration file. When the
141141
PowerShell session is closed, the variable and value are deleted.
142142

143143
- CurrentUser
144144

145145
The execution policy affects only the current user. It's stored in the
146-
**HKEY_CURRENT_USER** registry subkey.
146+
**CurrentUser** configuration file.
147147

148148
- LocalMachine
149149

150150
The execution policy affects all users on the current computer. It's stored
151-
in the **HKEY_LOCAL_MACHINE** registry subkey.
151+
in the **AllUsers** configuration file.
152152

153153
## Managing the execution policy with PowerShell
154154

@@ -201,11 +201,11 @@ To change the PowerShell execution policy on your Windows computer, use the
201201
need to restart PowerShell.
202202

203203
If you set the execution policy for the scopes **LocalMachine** or the
204-
**CurrentUser**, the change is saved in the registry and remains effective
204+
**CurrentUser**, the change is saved in the configuration file and remains effective
205205
until you change it again.
206206

207207
If you set the execution policy for the **Process** scope, it's not saved in
208-
the registry. The execution policy is retained until the current process and
208+
the configuration file. The execution policy is retained until the current process and
209209
any child processes are closed.
210210

211211
> [!NOTE]
@@ -280,13 +280,13 @@ For example:
280280
pwsh.exe -ExecutionPolicy AllSigned
281281
```
282282

283-
The execution policy that you set isn't stored in the registry. Instead, it's
283+
The execution policy that you set isn't stored in the configuration file. Instead, it's
284284
stored in the `$env:PSExecutionPolicyPreference` environment variable. The
285285
variable is deleted when you close the session in which the policy is set. You
286286
cannot change the policy by editing the variable value.
287287

288288
During the session, the execution policy that is set for the session takes
289-
precedence over an execution policy that is set in the registry for the local
289+
precedence over an execution policy that is set in the configuration file for the local
290290
computer or current user. However, it doesn't take precedence over the
291291
execution policy set by using a Group Policy.
292292

0 commit comments

Comments
 (0)