Controleren of een poort openstaat in Windows

Op deze pagina:

    controleren of een poort openstaat kan via de commandprompt met netstat.

    Voorbeeld waar gezocht wordt of poort 2638 openstaat:

    
    C:\>netstat -ano |find /i "2638"
      TCP    0.0.0.0:2638           0.0.0.0:0              LISTENING       28560
      TCP    10.10.50.161:58479     10.10.50.53:2638       ESTABLISHED     12452
      TCP    10.10.50.161:58481     10.10.50.53:2638       ESTABLISHED     12452
      TCP    10.10.50.161:58484     10.10.50.53:2638       ESTABLISHED     12452
      TCP    [::]:2638              [::]:0                 LISTENING       28560
      UDP    10.10.50.161:2638      *:*                                    28560
      UDP    127.0.0.1:2638         *:*                                    28560
      UDP    172.18.55.225:2638     *:*                                    28560
      UDP    192.168.56.1:2638      *:*                                    28560
      UDP    [::1]:2638             *:*                                    28560
    

    de laatste kolom bevat de PID waarmee je in taakbeheer kan zien welk proces dit is:

    taakbeheer PID

    Een andere methode om te controleren of een poort openstaat is met Powershell.Wederom een voorbeeld waarbij gekeken wordt naar poort 2638:

    
    C:\>powershell
    Windows PowerShell
    Copyright (C) Microsoft Corporation. All rights reserved.
    
    Try the new cross-platform PowerShell https://aka.ms/pscore6
    
    PS C:\Users\kdk> Get-Process -Id (Get-NetTCPConnection -LocalPort 2638).OwningProcess
    
    Handles  NPM(K)    PM(K)      WS(K)     CPU(s)     Id  SI ProcessName
     -------  ------    -----      -----     ------     --  -- -----------
         428      42   211696     108300             28560   0 dbsrv17
    
    
    PS C:\>
    

     

    Verwante artikelen