From 20987ac43e16c7eeaee1a6670c226554bf5b1865 Mon Sep 17 00:00:00 2001 From: Mr-Kappelmann <125663567+Mr-Kappelmann@users.noreply.github.com> Date: Thu, 12 Mar 2026 07:12:24 +0100 Subject: [PATCH 1/2] Update Enable-PSFConsoleInterrupt.ps1 prevent error: Exception setting "TreatControlCAsInput": "The handle is invalid." --- PSFramework/functions/utility/Enable-PSFConsoleInterrupt.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PSFramework/functions/utility/Enable-PSFConsoleInterrupt.ps1 b/PSFramework/functions/utility/Enable-PSFConsoleInterrupt.ps1 index df047987..43b82bf3 100644 --- a/PSFramework/functions/utility/Enable-PSFConsoleInterrupt.ps1 +++ b/PSFramework/functions/utility/Enable-PSFConsoleInterrupt.ps1 @@ -14,5 +14,5 @@ [CmdletBinding()] param () - [Console]::TreatControlCAsInput = $false -} \ No newline at end of file + try { [Console]::TreatControlCAsInput = $false } catch {} +} From 2e6db1849bfc00ac3839bb7d53ddaaf1fb891e6c Mon Sep 17 00:00:00 2001 From: Mr-Kappelmann <125663567+Mr-Kappelmann@users.noreply.github.com> Date: Thu, 12 Mar 2026 07:16:09 +0100 Subject: [PATCH 2/2] Update Disable-PSFConsoleInterrupt.ps1 prevent error Exception setting "TreatControlCAsInput": "The handle is invalid." --- PSFramework/functions/utility/Disable-PSFConsoleInterrupt.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PSFramework/functions/utility/Disable-PSFConsoleInterrupt.ps1 b/PSFramework/functions/utility/Disable-PSFConsoleInterrupt.ps1 index 0c5af917..d6ca90cf 100644 --- a/PSFramework/functions/utility/Disable-PSFConsoleInterrupt.ps1 +++ b/PSFramework/functions/utility/Disable-PSFConsoleInterrupt.ps1 @@ -18,5 +18,5 @@ [CmdletBinding()] param () - [Console]::TreatControlCAsInput = $true -} \ No newline at end of file + try { [Console]::TreatControlCAsInput = $true } catch {} +}