Thursday, April 2, 2015

#50 : How to check with Powershell that URL is responsive or not?

You can write script in Powershell to check the status of certain URL (Uniform Resource Locator). In some cases, we may need to monitor if certain intranet application is working or not. Sometimes SQL Server Reporting services are required to be checked if URL is responsive.



To use it, you may call the function like below :

Check-URL "http://yourapplicationname.com"


That’s it! You are done and nothing more is required.

1 comment:

  1. Hi, Thanks a lot for the script.. i have a question, what if site is taking long time to come up? is there a timeout option, means my site is takes 5 minutes to come up and running. so can we keep pinging until we get status code 200.

    ReplyDelete

#112: How to handle xml document in Powershell?

 In PowerShell, you can handle XML data using various cmdlets and methods provided by the .NET Framework. Here's a basic guide on how to...