Capture Http response code across multiple servers

Welcome Forums General PowerShell Q&A Capture Http response code across multiple servers

Viewing 1 reply thread
  • Author
    Posts
    • #233593
      Participant
      Topics: 1
      Replies: 0
      Points: 11
      Rank: Member

      how can i capture a http response code across multiple servers in a domain

      • This topic was modified 3 months, 2 weeks ago by kvprasoon. Reason: Moving to correct forum
    • #237775
      Participant
      Topics: 0
      Replies: 2
      Points: 36
      Rank: Member

      Sample to capture status code of http://www.google.com:

      Invoke-WebRequest www.google.com | Select-Object -Property StatusCode

      You can iterate the above code using a for loop for any number of URIs, or using an Infile.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.