How to custom ping with Windows PowerShell?

Windows is one of the largest companies that exists in the world, this is mainly due to the fact that each time it updates its operating system, impressive and very functional functions are added (not counting those that already came from before), with that In mind today you will learn how to do custom ping with Windows PowerShell.

And it is that, although for many it is not necessary to use the system that allows entering commands in Windows, the reality is that there are many functions that can be activated within it that will make anyone’s life easier (such as being able to see programs installed in local or remote computer with Windows Powershell ). That is why you must venture to obtain greater knowledge about it.

Ping custom with Windows PowerShell

To start custom pinging with Windows PowerShell, you must obviously first log into your Windows and then enter the aforementioned program.

Here you must enter the following script: Clear $ IP = Read-Host -Prompt ‘Enter IP’While ($ TRUE) {if ((Test-Connection -computer $ IP -Delay 1 -quiet)) {$ Date = Get-DateWrite -Host -ForegroundColor Green «$ (Get-Date -format« dd-MM-yyyy HH: mm: ss »): $ IP Ok!»} Else {$ Date = Get-DateWrite-Host -ForegroundColor Red «$ (Get -Date -format “dd-MM-yyyy HH: mm: ss”): $ IP Ko! “}}

This is the one that will help you customize the ping, since as you can read, what it will do is activate certain commands that change the color of the connections once they are pinged.

If the connection is good and working correctly, it will appear in green once you enter its IP in the Powershell, but if it is failing or is not active it will appear in a red color.

 

This obviously differs from normal ping which is always blank, and it is much better, because you won’t have to read anything to know which connections are working the way they should, thus saving you time.

Save the executable file to a folder

In addition to the above, you can also save the file where you placed the Script as an executable, so that there is no need to repeat the whole process again.

To achieve that you just have to click on the option ” File ” found in the top bar and then select ” Save as”. In the window that will appear, you must choose the folder where you want to save, once you have done it, click on ” Save ” to confirm.

When you want to use the executable, you just have to go to the folder you chose and right click on the file. With that a drop-down menu will open where you must select “Run with powershell”, there you will be able to place the IP and see the results in colors.

What is a ping?

With the above that you read you should already be clear about how to do custom ping with Windows PowerShell. So as a little extra today you will also learn what a ping is.

Basically a ping is a diagnostic utility that checks the status of a communication in a computer, between the host and one or more remote computers that belong to a network and run an IP.

 

This is used to measure the time it takes for two points to communicate. As for the term ping, it refers to the latency or delay between the connections of a network game.

There is also another type of ping that is used in ATM networks.  What it does is check if the ATM links are defined correctly. The main functions of ping are to verify connections such as: Internet, DNS, TCP / IP protocols, the local network, among others.

So knowing its correct use is of the utmost importance for anyone who has an electronic device or PC, since with it you can make exact diagnoses (you can literally even ping an IP address or web page , just to see if it works) .

Now that you know how to do Custom Ping with Windows PowerShell, you should immediately go try it using the method you learned today. Remember that this program also allows you to do things like https://miracomosehace.com/hacer-listar-eventos-encendido-apagado-windows-powershell/ make lists of events on and off the PC, or download a file from the internet , so you should find out more about it.

 

Leave a Comment