Devops release to fail if ping do not return a 200

Nibbler 616 Reputation points

Hello all.

I`m looking into how I can make a release fails if the ping of a URL does not return a 200. However, I can find any documentation on DevOps or any PowerShell in how to do this.

Anybody have a good approach to add to do this with a Azure Powershell step in DevOps, release-pipeline…


Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,455 questions
0 comments No comments
{count} votes

1 additional answer

Sort by: Most helpful
  1. Rich Matheisen 45,831 Reputation points

    Use Invoke-WebRequest and check the ResponseCode property in the object it returns. To reduce the overhead, and eliminate the sometimes parsing problems, use the -UseBasicParsing parameter.