diff --git a/src/PowerShellEditorServices/Services/PowerShellContext/Session/Capabilities/DscBreakpointCapability.cs b/src/PowerShellEditorServices/Services/PowerShellContext/Session/Capabilities/DscBreakpointCapability.cs index 09f795cc4..b484c60ca 100644 --- a/src/PowerShellEditorServices/Services/PowerShellContext/Session/Capabilities/DscBreakpointCapability.cs +++ b/src/PowerShellEditorServices/Services/PowerShellContext/Session/Capabilities/DscBreakpointCapability.cs @@ -97,7 +97,7 @@ public static DscBreakpointCapability CheckForCapability( powerShell.AddCommand("Import-Module"); powerShell.AddArgument(@"C:\Program Files\DesiredStateConfiguration\1.0.0.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psd1"); powerShell.AddParameter("PassThru"); - powerShell.AddParameter("ErrorAction", "Ignore"); + powerShell.AddParameter("ErrorAction", "SilentlyContinue"); PSObject moduleInfo = null; diff --git a/src/PowerShellEditorServices/Services/PowerShellContext/Utilities/CommandHelpers.cs b/src/PowerShellEditorServices/Services/PowerShellContext/Utilities/CommandHelpers.cs index 4dc94b55b..f42a0e767 100644 --- a/src/PowerShellEditorServices/Services/PowerShellContext/Utilities/CommandHelpers.cs +++ b/src/PowerShellEditorServices/Services/PowerShellContext/Utilities/CommandHelpers.cs @@ -86,7 +86,7 @@ public static async Task GetCommandInfoAsync( PSCommand command = new PSCommand(); command.AddCommand(@"Microsoft.PowerShell.Core\Get-Command"); command.AddArgument(commandName); - command.AddParameter("ErrorAction", "Ignore"); + command.AddParameter("ErrorAction", "SilentlyContinue"); CommandInfo commandInfo = (await powerShellContext.ExecuteCommandAsync(command, sendOutputToHost: false, sendErrorToHost: false).ConfigureAwait(false)) .Select(o => o.BaseObject) @@ -138,7 +138,7 @@ public static async Task GetCommandSynopsisAsync( // CommandInfo.ToString() duplicates the Prefix if one exists. .AddParameter("Name", commandInfo.Name) .AddParameter("Online", false) - .AddParameter("ErrorAction", "Ignore"); + .AddParameter("ErrorAction", "SilentlyContinue"); var results = await powerShellContext.ExecuteCommandAsync(command, sendOutputToHost: false, sendErrorToHost: false).ConfigureAwait(false); PSObject helpObject = results.FirstOrDefault();