PowerShell Script to Hit a URL 100 Times

Explanation:

  • Invoke-WebRequest: Sends an HTTP GET request to the specified URL.
  • Error Handling: Catches exceptions (e.g., timeouts) and logs the failure.
  • Logging: Outputs the status of each hit, including the HTTP status code or error message.

Notes:

  • Be cautious when hitting a URL repeatedly, as it can be seen as a potential Denial of Service (DoS) attack. Ensure you have permission to test the URL this way.
  • If the server has rate-limiting or security measures in place, it may block your requests after a certain number of hits.