Sonntag, 5. Januar 2014

Powershell: Ping and Test-Connection

For you who want to have a "True" as PING result please use
PS > Test-Connection -ComputerName xx -Quiet 
and you get a True or False. This is useful for PowerShell Scripting.




PS C:\Users\SCADM> Test-Connection -ComputerName dc1 -Quiet
True
PS C:\Users\SCADM> Test-Connection -ComputerName dc1 -Count 5

Source        Destination     IPV4Address      IPV6Address                              Bytes    Time(ms
------        -----------     -----------      -----------                              -----    -------
Z-OR01        dc1             192.168.2.60                                              32       0
Z-OR01        dc1             192.168.2.60                                              32       0
Z-OR01        dc1             192.168.2.60                                              32       0
Z-OR01        dc1             192.168.2.60                                              32       0
Z-OR01        dc1             192.168.2.60                                              32       0

Keine Kommentare:

Kommentar veröffentlichen