stuartgmilton
Enthusiast
Enthusiast

PowerCLI - Verify if a website is up.

Hi guys,

So I realise that this is not the purpose of PowerCLI, but I'm trying to create my own 'DailyChecks' script to move my team into a more automated way of working rather than checking everything manually.

So in effect, I'd like to do something like an Invoke-WebRequest, but in PowerCLI - This would allow me to have one script to do everything.

Cheers,
Stuart

0 Kudos
3 Replies
LucD
Leadership
Leadership

You could use the Test-Connection cmdlet to test if the host is up.

For website availability you could use something like this


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Borja_Mari
Virtuoso
Virtuoso

Hello,

you can use something like this:

http://faces.eti.br/2011/07/28/checking-website-status-with-powershell/comment-page-1/

Another more detailed example:

Using PowerShell to Query Web Site Information | Learn Powershell | Achieve More

Best regards,

Pablo

------------------------------------------------------------------------------------------------- PLEASE CONSIDER AWARDING any HELPFUL or CORRECT reply. Thanks!! Por favor CONSIDERA PREMIAR cualquier respuesta ÚTIL o CORRECTA . ¡¡Muchas gracias!! VCP3, VCP4, VCP5-DCV (VCP550), vExpert 2010, 2014 BLOG: http://communities.vmware.com/blogs/VirtuallyAnITNoob
stuartgmilton
Enthusiast
Enthusiast

Many Thanks to both of you.

As it turn out, my connection code was working, but the firewall had been blocking the traffic on port 80 to my other network.


Another question coming soon about Zombies...

0 Kudos