@@ -82,7 +82,7 @@ Policy settings are used by administrators to centrally manage PowerShell.
82
82
| Location | Policy settings | Regular settings |
83
83
| --------------| -----------------------------------------------------------| ------------------------------------------------------------|
84
84
| File section | "PowerShell": { "PolicySettings": {...} } | "PowerShell": { "RegularSettings": {...} } |
85
- | Registry key | Software\Policies\PowerShellCore | Software\PowerShellCore |
85
+ | Registry key | Software\Policies\PowerShellCore | Not Applicable |
86
86
87
87
### Policy settings Setting Fall-Back
88
88
@@ -101,14 +101,16 @@ The default in Group Policy is to have no policy, so it would not fall back to W
101
101
102
102
Because a configuration setting can be in several schemes, the setting wins according to the priority of its scheme.
103
103
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 ) .
105
107
106
108
| Scheme | Windows | Unix |
107
109
| -----------------------------| ------------------------------------------------------| ------------------------------------------------------|
108
110
| GPO -> Computer Policy | HKLM\Software\Policies\PowerShellCore | See [ Moving configuration out of PSHome] [ moving ] |
109
111
| 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 ] |
111
112
| 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 ] |
112
114
| File -> User-Wide | %APPDATA%/powershell.config.json | %XDG_CONFIG_HOME%/powershell.config.json |
113
115
114
116
Defaults:
@@ -135,38 +137,55 @@ only when not in System Lock-down mode.
135
137
136
138
This will have performance impact on startup, but only when ` -settingsfile ` is specified.
137
139
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 ) .
139
143
140
144
| Scheme | Windows | Unix |
141
145
| -----------------------------| ------------------------------------------------------| ------------------------------------------------------|
146
+ | GPO -> User Config | HKCU\Software\PowerShellCore | %XDG_CONFIG_HOME%/powershell.config.json |
147
+ | GPO -> Computer Config | HKLM\Software\PowerShellCore | /etc/powershell.config.json |
142
148
| File -> Application-Startup | pwsh -settingsfile ` somepath/powershell.config.json ` | pwsh -settingsfile ` somepath/powershell.config.json ` |
143
149
| File -> User-Wide | %APPDATA%\powershell.config.json | %XDG_CONFIG_HOME%/powershell.config.json |
144
150
| 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
+ | -----------------------------| ------------------------------------------------------| ------------------------------------------------------|
146
158
| 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 |
147
161
148
162
### Configuration settings
149
163
150
164
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.
151
165
152
166
#### Registry keys and settings
153
167
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 |
170
189
171
190
I filed [ #9632 ] ( https://github.com/PowerShell/PowerShell/issues/9632 ) on UpdatableHelp-DefaultSourcePath to make it allow User settings.
172
191
@@ -236,3 +255,7 @@ Per issues [9278](https://github.com/PowerShell/PowerShell/issues/9278) we need
236
255
follow that issue for issues related to new locations of files.
237
256
238
257
[ 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