diff --git a/contrib/win32/openssh/install-sshd.ps1 b/contrib/win32/openssh/install-sshd.ps1 index f7b0df18b..77f8ecab3 100644 --- a/contrib/win32/openssh/install-sshd.ps1 +++ b/contrib/win32/openssh/install-sshd.ps1 @@ -255,13 +255,13 @@ if (-not (Test-Path $sshdpath)) { if (Get-Service sshd -ErrorAction SilentlyContinue) { Stop-Service sshd - sc.exe delete sshd 1> null + sc.exe delete sshd 1>$null } if (Get-Service ssh-agent -ErrorAction SilentlyContinue) { Stop-Service ssh-agent - sc.exe delete ssh-agent 1> null + sc.exe delete ssh-agent 1>$null } New-Service -Name ssh-agent -BinaryPathName $sshagentpath -Description "SSH Agent" -StartupType Manual | Out-Null diff --git a/contrib/win32/openssh/uninstall-sshd.ps1 b/contrib/win32/openssh/uninstall-sshd.ps1 index 8f0cd90f4..7ccff620d 100644 --- a/contrib/win32/openssh/uninstall-sshd.ps1 +++ b/contrib/win32/openssh/uninstall-sshd.ps1 @@ -1,7 +1,7 @@ if (Get-Service sshd -ErrorAction SilentlyContinue) { Stop-Service sshd - sc.exe delete sshd 1> null + sc.exe delete sshd 1>$null Write-Host -ForegroundColor Green "sshd successfully uninstalled" } else { @@ -11,12 +11,9 @@ else { if (Get-Service ssh-agent -ErrorAction SilentlyContinue) { Stop-Service ssh-agent - sc.exe delete ssh-agent 1>null + sc.exe delete ssh-agent 1>$null Write-Host -ForegroundColor Green "ssh-agent successfully uninstalled" } else { Write-Host -ForegroundColor Yellow "ssh-agent service is not installed" } - - -