From 70673dc837b5f9f4f77210b00ad783f34b9a9811 Mon Sep 17 00:00:00 2001 From: P6g9YHK6 <17877371+P6g9YHK6@users.noreply.github.com> Date: Fri, 20 Dec 2024 09:17:54 +0000 Subject: [PATCH] Update ./scripts/Checks/is RDP port ok.ps1 --- scripts_staging/Checks/is RDP port ok.ps1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts_staging/Checks/is RDP port ok.ps1 b/scripts_staging/Checks/is RDP port ok.ps1 index 6a1fa48b..aac6ebbd 100644 --- a/scripts_staging/Checks/is RDP port ok.ps1 +++ b/scripts_staging/Checks/is RDP port ok.ps1 @@ -14,7 +14,7 @@ .CHANGELOG 12.12.24 SAN Changed outputs - + 20.12.24 SAN Changed outputs #> $port = 3389 @@ -24,9 +24,9 @@ $address = "localhost" if (Get-Command Test-NetConnection -ErrorAction SilentlyContinue) { $tcpConnection = Test-NetConnection -ComputerName $address -Port $port if ($tcpConnection.TcpTestSucceeded) { - Write-Output "RDP is open." + Write-Output "OK: RDP is open." } else { - Write-Output "Port $port is not open RDP will not work." + Write-Output "KO: Port $port is not open RDP will not work." exit 1 } } else { @@ -34,10 +34,10 @@ if (Get-Command Test-NetConnection -ErrorAction SilentlyContinue) { try { $tcpClient = New-Object System.Net.Sockets.TcpClient $tcpClient.Connect($address, $port) - Write-Output "RDP is open but TNC does not work." + Write-Output "OK: RDP is open but TNC does not work." $tcpClient.Close() } catch { - Write-Output "Port $port is not open and TNC does not work." + Write-Output "KO: Port $port is not open and TNC does not work." exit 1 } } \ No newline at end of file