How to Custom Ping with Windows PowerShell? (Example)

Windows is one of the largest companies that exists in the world, this is mainly due to the fact that every 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 view programs installed on a 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 fine and working properly, it will appear in green color once you enter its IP in the Powershell, but if it is failing or is not active, it will appear in a red color.

blue shell superman

This obviously differs from the normal ping which is always blank, and is much better, because you won’t have to read anything to know what connections are working the way they should, so you can save 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 give 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 “Keep” 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 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 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 on a computer, between the host and one or more remote computers that belong to a network and run an IP.

powershell icon

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 go immediately to test it using the method you learned today. Remember that this program also allows you to do things like https://tdftips.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.

Source by

How useful did you find this content?

Click on a star to rate!

Average score 0 / 5. Counting of votes: 0

So far, no votes. Be the first to rate this content.

I'm sorry this content was not useful for you!

Let me improve this content!

Tell me, how can I improve this content?

Deja un comentario