Powershell to check port connectivity

Welcome Forums General PowerShell Q&A Powershell to check port connectivity

Viewing 2 reply threads
  • Author
    Posts
    • #182883
      Participant
      Topics: 7
      Replies: 16
      Points: 109
      Rank: Participant

      Hi Friends,

      I am looking for some help on checking port connectivity from multiple servers to the below. It should give me the output for me see on which ones it is listening and not. Any help is greatly appreciated
      <p dir=”LTR”>telnet 172.16.165.55 3660</p>
      telnet 172.16.165.56 3660

      Thank You

      J

       

    • #182904
      Senior Moderator
      Topics: 9
      Replies: 1309
      Points: 4,781
      Helping Hand
      Rank: Community Hero

      You might want to look at Test-NetConnection cmdlet, A combination with Invoke-Command might do the job for you.

      • #183150
        Participant
        Topics: 7
        Replies: 16
        Points: 109
        Rank: Participant

        Thank you..!
        How do i call the list of servers that i need to test? Get-content? Also, i would like to import the results in a csv format.

      • #183258
        Participant
        Topics: 6
        Replies: 108
        Points: 304
        Helping Hand
        Rank: Contributor

        Depends on how you have them stored. If you have a list of them in a text file, then Get-Content will work for you.

        And you can play with Export-Csv to output the results to a CSV file.

        Something like this should get your started:

    • #182946
      js
      Participant
      Topics: 32
      Replies: 842
      Points: 2,686
      Helping Hand
      Rank: Community Hero
Viewing 2 reply threads
  • The topic ‘Powershell to check port connectivity’ is closed to new replies.