From 01ecf4b3d383ed041c64bc94223d023663b52090 Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Mon, 8 Jan 2018 09:54:28 -0800 Subject: [PATCH] [Feature] Address Steve's new comments --- src/System.Management.Automation/engine/PSConfiguration.cs | 6 +++--- src/System.Management.Automation/engine/Utils.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/System.Management.Automation/engine/PSConfiguration.cs b/src/System.Management.Automation/engine/PSConfiguration.cs index ebc68ad885..ef01eba36c 100644 --- a/src/System.Management.Automation/engine/PSConfiguration.cs +++ b/src/System.Management.Automation/engine/PSConfiguration.cs @@ -498,7 +498,7 @@ namespace System.Management.Automation.Configuration /// /// The GroupPolicy related settings used in PowerShell are as follows in Registry: - /// - Software\Policies\Microsoft\Windows\PowerShell -- { EnableScripts (0 or 1); ExecutionPolicy (string) } + /// - Software\Policies\Microsoft\PowerShellCore -- { EnableScripts (0 or 1); ExecutionPolicy (string) } /// SubKeys Name-Value-Pairs /// - ScriptBlockLogging { EnableScriptBlockLogging (0 or 1); EnableScriptBlockInvocationLogging (0 or 1) } /// - ModuleLogging { EnableModuleLogging (0 or 1); ModuleNames (string[]) } @@ -528,10 +528,10 @@ namespace System.Management.Automation.Configuration /// "Transcription": { /// "EnableTranscripting": true, /// "EnableInvocationHeader": true, - /// "OutputDirectory": "c:\tmp" + /// "OutputDirectory": "c:\\tmp" /// }, /// "UpdatableHelp": { - /// "DefaultSourcePath": "f:\temp" + /// "DefaultSourcePath": "f:\\temp" /// }, /// "ConsoleSessionConfiguration": { /// "EnableConsoleSessionConfiguration": true, diff --git a/src/System.Management.Automation/engine/Utils.cs b/src/System.Management.Automation/engine/Utils.cs index 800036e65c..3659d0c4cd 100644 --- a/src/System.Management.Automation/engine/Utils.cs +++ b/src/System.Management.Automation/engine/Utils.cs @@ -551,7 +551,7 @@ namespace System.Management.Automation case nameof(Transcription): result = policies.Transcription; break; case nameof(UpdatableHelp): result = policies.UpdatableHelp; break; case nameof(ConsoleSessionConfiguration): result = policies.ConsoleSessionConfiguration; break; - default: Diagnostics.Assert(false, "Unreachable code"); break; + default: Diagnostics.Assert(false, "Should be unreachable code. Update this switch block when new PowerShell policy types are added."); break; } if (result != null) { return (T) result; } }