Skip to content

Commit 227f56a

Browse files
committed
remove accidental new behavior.
1 parent e98fc1c commit 227f56a

File tree

1 file changed

+44
-21
lines changed

1 file changed

+44
-21
lines changed

1-Draft/RFCXXXX-Policy.md

Lines changed: 44 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Policy settings are used by administrators to centrally manage PowerShell.
8282
| Location | Policy settings | Regular settings |
8383
|--------------|-----------------------------------------------------------|------------------------------------------------------------|
8484
| File section | "PowerShell": { "PolicySettings": {...} } | "PowerShell": { "RegularSettings": {...} } |
85-
| Registry key | Software\Policies\PowerShellCore | Software\PowerShellCore |
85+
| Registry key | Software\Policies\PowerShellCore | Not Applicable |
8686

8787
### Policy settings Setting Fall-Back
8888

@@ -101,14 +101,16 @@ The default in Group Policy is to have no policy, so it would not fall back to W
101101

102102
Because a configuration setting can be in several schemes, the setting wins according to the priority of its scheme.
103103

104-
#### Precedence for Policy settings in descending order
104+
#### Precedence for Computer-Wide settings in descending order
105+
106+
Note, this is listed as `Computer, Then User` in [Registry keys and settings](#registry-keys-and-settings).
105107

106108
| Scheme | Windows | Unix |
107109
|-----------------------------|------------------------------------------------------|------------------------------------------------------|
108110
| GPO -> Computer Policy | HKLM\Software\Policies\PowerShellCore | See [Moving configuration out of PSHome][moving] |
109111
| GPO -> User Policy | HKCU\Software\Policies\PowerShellCore | %XDG_CONFIG_HOME%/powershell.config.json |
110-
| File -> Computer-Wide | See [Moving configuration out of PSHome][moving] | [Moving configuration out of PSHome][moving] |
111112
| File -> Application-Startup | pwsh -settingsfile `somepath/powershell.config.json` | pwsh -settingsfile `somepath/powershell.config.json` |
113+
| File -> Computer-Wide | See [Moving configuration out of PSHome][moving] | [Moving configuration out of PSHome][moving] |
112114
| File -> User-Wide | %APPDATA%/powershell.config.json | %XDG_CONFIG_HOME%/powershell.config.json |
113115

114116
Defaults:
@@ -135,38 +137,55 @@ only when not in System Lock-down mode.
135137

136138
This will have performance impact on startup, but only when `-settingsfile` is specified.
137139

138-
#### Precedence for Regular settings in descending order
140+
#### Precedence for User settings in descending order
141+
142+
Note, this is listed as `User, then Computer` in [Registry keys and settings](#registry-keys-and-settings).
139143

140144
| Scheme | Windows | Unix |
141145
|-----------------------------|------------------------------------------------------|------------------------------------------------------|
146+
| GPO -> User Config | HKCU\Software\PowerShellCore | %XDG_CONFIG_HOME%/powershell.config.json |
147+
| GPO -> Computer Config | HKLM\Software\PowerShellCore | /etc/powershell.config.json |
142148
| File -> Application-Startup | pwsh -settingsfile `somepath/powershell.config.json` | pwsh -settingsfile `somepath/powershell.config.json` |
143149
| File -> User-Wide | %APPDATA%\powershell.config.json | %XDG_CONFIG_HOME%/powershell.config.json |
144150
| File -> Computer-Wide | See [Moving configuration out of PSHome][moving] | /opt/Microsoft/powershell/powershell.config.json |
145-
| GPO -> User Config | HKCU\Software\PowerShellCore | %XDG_CONFIG_HOME%/powershell.config.json |
151+
152+
#### Precedence for UpdatableHelp in descending order
153+
154+
Note, this is listed as `Computer` in [Registry keys and settings](#registry-keys-and-settings).
155+
156+
| Scheme | Windows | Unix |
157+
|-----------------------------|------------------------------------------------------|------------------------------------------------------|
146158
| GPO -> Computer Config | HKLM\Software\PowerShellCore | /etc/powershell.config.json |
159+
| File -> Application-Startup | pwsh -settingsfile `somepath/powershell.config.json` | pwsh -settingsfile `somepath/powershell.config.json` |
160+
| File -> Computer-Wide | See [Moving configuration out of PSHome][moving] | /opt/Microsoft/powershell/powershell.config.json |
147161

148162
### Configuration settings
149163

150164
A set of configuration settings in GPO scheme and file scheme for policy settings and regular settings is the same. This allows to discover and configure settings in the simplest and fastest way.
151165

152166
#### Registry keys and settings
153167

154-
| Key | SubKey | Option | Type | Precedence |
155-
|----------------------------------|-----------------------------|------------------------------------|--------|---------------------|
156-
| Software\Policies\PowerShellCore | - | - | | |
157-
| Software\PowerShellCore | - | - | | |
158-
| | | ExecutionPolicy | String | Computer, Then User |
159-
| | ConsoleSessionConfiguration | EnableConsoleSessionConfiguration | DWORD | User, then Computer |
160-
| | ConsoleSessionConfiguration | ConsoleSessionConfigurationName | String | User, then Computer |
161-
| | ModuleLogging | EnableModuleLogging | DWORD | Computer, Then User |
162-
| | ModuleLogging | ModuleNames | String | Computer, Then User |
163-
| | ProtectedEventLogging | EncryptionCertificate | DWORD | Computer Wide |
164-
| | ScriptBlockLogging | EnableScriptBlockInvocationLogging | DWORD | Computer, Then User |
165-
| | ScriptBlockLogging | EnableScriptBlockLogging | DWORD | Computer, Then User |
166-
| | Transcription | EnableTranscripting | DWORD | Computer, Then User |
167-
| | Transcription | EnableInvocationHeader | DWORD | Computer, Then User |
168-
| | Transcription | OutputDirectory | String | Computer, Then User |
169-
| | UpdatableHelp | DefaultSourcePath | String | Computer Wide |
168+
Notes:
169+
170+
- All policies are in `Software\Policies\PowerShellCore`.
171+
- `ExecutionPolicy` is not in any SubKey.
172+
173+
| SubKey | Option | Type | Precedence |
174+
|-----------------------------|------------------------------------|--------|---------------------|
175+
| - | - | | |
176+
| - | - | | |
177+
| | ExecutionPolicy | String | Computer, Then User |
178+
| ConsoleSessionConfiguration | EnableConsoleSessionConfiguration | DWORD | User, then Computer |
179+
| ConsoleSessionConfiguration | ConsoleSessionConfigurationName | String | User, then Computer |
180+
| ModuleLogging | EnableModuleLogging | DWORD | Computer, Then User |
181+
| ModuleLogging | ModuleNames | String | Computer, Then User |
182+
| ProtectedEventLogging | EncryptionCertificate | DWORD | Computer Wide |
183+
| ScriptBlockLogging | EnableScriptBlockInvocationLogging | DWORD | Computer, Then User |
184+
| ScriptBlockLogging | EnableScriptBlockLogging | DWORD | Computer, Then User |
185+
| Transcription | EnableTranscripting | DWORD | Computer, Then User |
186+
| Transcription | EnableInvocationHeader | DWORD | Computer, Then User |
187+
| Transcription | OutputDirectory | String | Computer, Then User |
188+
| UpdatableHelp | DefaultSourcePath | String | Computer Wide |
170189

171190
I filed [#9632](https://github.com/PowerShell/PowerShell/issues/9632) on UpdatableHelp-DefaultSourcePath to make it allow User settings.
172191

@@ -236,3 +255,7 @@ Per issues [9278](https://github.com/PowerShell/PowerShell/issues/9278) we need
236255
follow that issue for issues related to new locations of files.
237256

238257
[moving]:#moving-configuration-out-of-pshome
258+
259+
### Allowing Regular settings from the registry in Windows
260+
261+
This is out of scope of this RFCs

0 commit comments

Comments
 (0)