What’s a good way in PowerShell to check for an IP address switch on a webserver?

Question:

Problem

Our web host provider is changing the IP address of one of the servers we are on. We have been given a time frame for when the switch will take place, but no exact details. Therefore, our current poor man’s check requires a periodic page refresh on a browser to see if our website is still there.

Question

We are all programmers here and this is killing me that any manual checking is required. I would know how to do this in other languages, but want to know if there is a way to write a script in PowerShell to tackle this problem. Does anyone know how I might going about this?

Answer:

If you can alert if the page is gone or does not have an expected value, you could use a script like

Source:

What’s a good way in PowerShell to check for an IP address switch on a webserver? by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply