Categories:
Administration (10)
Adware Spyware (7)
Apache (10)
Bluetooth (125)
DOS Commands (1)
Edge (28)
General (2)
Internet Explorer (217)
Media Center (12)
Media Player (11)
Mozilla Firefox (18)
PHP (15)
Programming (8)
Security (4)
Silverlight (15)
Tips (17)
Tools (218)
Tutorials (5)
Windows 10 (166)
Windows 7 (636)
Windows 8 (1091)
Windows Phone (33)
Windows Server 2008 (165)
Windows Server 2012 (84)
Windows Server 2016 (23)
Windows Vista (52)
Collections:
Other Resources:
"Test-Connection" Cmdlet in Windows PowerShell
How to use "Test-Connection" cmdlet in Windows PowerShell?
✍: FYIcenter.com
"Test-Connection" cmdlet in Windows PowerShell is similar to the old "ping" command.
The Test-Connection cmdlet sends Internet Control Message Protocol (ICMP) echo request packets ("pings") to one or more remote computers and returns the echo response replies. You can use this cmdlet to determine whether a particular computer can be contacted across an Internet Protocol (IP) network.
You can use the parameters of Test-Connection to specify both the sending and receiving computers, to run the command as a background job, to set a timeout and number of pings, and to configure the connection and authentication.
Unlike the traditional "ping" command, Test-Connection returns a Win32_PingStatus object that you can investigate in Windows PowerShell, but you can use the Quiet parameter to force it to return only a Boolean value.
The following example shows how to test connections with multiple remote computers:
PS C:\fyicenter> test-connection www.google.com,www.yahoo.com -Count 1 Destination IPV4Address Bytes Time(ms) ----------- ----------- ----- -------- www.yahoo.com 98.138.253.109 32 52 www.google.com 172.217.4.164 32 76
You can also test the connection between two remote computers. For example, this command tests the connection from the Webserver to the DBserver:
PS C:\fyicenter> test-connection DBserver -Source Webserver
Note that "test-connection" cmdlet will fail, if the network firewall stops the ICMP protocol between the two computers.
Â
⇒ Windows PowerShell Session with Remote Computers
⇠Remote Computing Overview in Windows PowerShell
⇑ Managing Remote Computer with Windows PowerShell
⇑⇑ Windows PowerShell Tutorials
2016-10-17, 1816👍, 0💬
Popular Posts:
Understanding HelpSvc.exe, "Microsoft Help Center Service" - part of the "Help and Support Center" a...
Can I disable Windows service "EvtEng" to speedup my computer? Windows service "EvtEng" - Intel Even...
How to dump the list of all processes that are running on my Windows 7 system? I want save names of ...
How do I display the total amount of time required to play all of the songs in my library? To view "...
How to use sc.exe command to create a new service? If you want to create a new service, you can use ...