ping dc command is not working

This topic contains 2 replies, has 3 voices, and was last updated by  js 3 months, 2 weeks ago.

  • Author
    Posts
  • #76767

    VARUN KUMAR
    Participant

    https://mva.microsoft.com/en-US/training-courses/getting-started-with-microsoft-powershell-8276?l=r54IrOWy_2304984382
    Reference to above course topic 1 i have typed the program :- ping dc but it did not worked. Can any body know why. Iam running it as an administrator mode

  • #76771

    Don Jones
    Keymaster

    I'm guessing you have not used the "ping" command before. It isn't PowerShell, but happy to try and help. I'm guessing you do not have a computer named "DC" on your network.

    https://www.computerhope.com/pinghlp.htm Explains the command.

  • #76774

    js
    Participant

    Something like "ping yahoo.com" should work. It's very easy to ping with .net as well:

    function ping ($hostname='yahoo.com', $timeout = 500) {
      $Ping = [System.Net.Networkinformation.ping]::new()
      $Ping.Send($hostname, $timeout)
    }
    
    
    PS /> ping facebook.com
    
    Status        : Success
    Address       : 31.13.71.36
    RoundtripTime : 13
    Options       : 
    Buffer        : {}
    

You must be logged in to reply to this topic.