Skip to end of metadata
Go to start of metadata

Problem:


It seems like a connection can't be established to the remote server. Is there an option to check on a Microsoft Windows Server with tools like 'PowerShell' the connectivity?



Solution:


You can use the 'PowerShell*' to check the connection inclusive a port with the CMD "Test". You can find a full documentation on Microsoft documentation pages https://docs.microsoft.com/en-us/powershell/module/nettcpip/test-netconnection?view=win10-ps*


PowerShell CMD
 Test-NetConnection -ComputerName "signavio.com" -Port 80 -InformationLevel "Detailed"


Successful Result
PS C:\Users\JohnDoe> Test-NetConnection -ComputerName "signavio.com" -Port 80 -InformationLevel "Detailed"                                                                                                                                                                                                                                                                                                                                                                                                                                   ComputerName            : signavio.com                                                                                                                                           
RemoteAddress           : xxx.x.xx.xx                                                                                                                                            
RemotePort              : 80                                                                                                                                                     
NameResolutionResults   : xxx.x.xx.xx                                                                                                                                            
MatchingIPsecRules      :                                                                                                                                                        
NetworkIsolationContext : Internet                                                                                                                                               
IsAdmin                 : False                                                                                                                                                  
InterfaceAlias          : Ethernet                                                                                                                                               
SourceAddress           : xxx.x.xx.xx                                                                                                                                           
NetRoute (NextHop)      : xxx.x.xx.xx                                                                                                                                            
TcpTestSucceeded        : True


Unsuccessful result
PS C:\Users\JohnDoe> Test-NetConnection -ComputerName "signavio.com" -Port 20 -InformationLevel "Detailed"                                                                
WARNUNG: TCP connect to (xxx.x.xx.xx : 20) failed     

*Signavio is not responsible for the content of 3rd party vendors/links.


For older Version of Power Shell (like Windows 7) you can use the following command to test the connection/port:

Version 2 or earlier
$t = New-Object System.Net.Sockets.TcpClient 'my.domain.hostname', 8080; if($t.Connected) {"OK"}