From fa9dbcace4b7986a960be521c45ccc5c31ceaa62 Mon Sep 17 00:00:00 2001 From: DeveloperDurp Date: Fri, 10 Jan 2025 13:39:21 -0600 Subject: [PATCH] Move Installer for OpenSSH to a runspace (#3117) --- functions/public/Invoke-WPFButton.ps1 | 2 +- functions/public/Invoke-WPFSSHServer.ps1 | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 functions/public/Invoke-WPFSSHServer.ps1 diff --git a/functions/public/Invoke-WPFButton.ps1 b/functions/public/Invoke-WPFButton.ps1 index ef581f1c..68cdfa28 100644 --- a/functions/public/Invoke-WPFButton.ps1 +++ b/functions/public/Invoke-WPFButton.ps1 @@ -59,6 +59,6 @@ function Invoke-WPFButton { "MicrowinScratchDirBT" {Invoke-ScratchDialog} "WPFWinUtilInstallPSProfile" {Invoke-WinUtilInstallPSProfile} "WPFWinUtilUninstallPSProfile" {Invoke-WinUtilUninstallPSProfile} - "WPFWinUtilSSHServer" {Invoke-WinUtilSSHServer} + "WPFWinUtilSSHServer" {Invoke-WPFSSHServer} } } diff --git a/functions/public/Invoke-WPFSSHServer.ps1 b/functions/public/Invoke-WPFSSHServer.ps1 new file mode 100644 index 00000000..503f8677 --- /dev/null +++ b/functions/public/Invoke-WPFSSHServer.ps1 @@ -0,0 +1,17 @@ +function Invoke-WPFSSHServer { + <# + + .SYNOPSIS + Invokes the OpenSSH Server install in a runspace + + #> + + Invoke-WPFRunspace -DebugPreference $DebugPreference -ScriptBlock { + + Invoke-WinUtilSSHServer + + Write-Host "=======================================" + Write-Host "-- OpenSSH Server installed! ---" + Write-Host "=======================================" + } +}