Exercise 1: Invoke-RestMethod vs. Invoke-WebRequest — Possible Solution ==================================================================== THE DIFFERENCE ------------------------------ Per this chapter, Invoke-RestMethod automatically parses a JSON (or XML) response and hands back real, usable PowerShell objects directly - effectively Invoke-WebRequest plus an automatic ConvertFrom-Json already applied. Invoke-WebRequest instead returns the raw HTTP response as a whole - status code, the full header collection, and the body still as raw, unparsed text (.Content) that has to be converted manually if it's JSON. A CONCRETE SITUATION NEEDING Invoke-WebRequest ------------------------------ Per this chapter, Invoke-WebRequest is needed the moment something beyond the parsed JSON data itself is actually required - for example, checking the HTTP status code directly (distinguishing a 200 from a 201 rather than just getting data back either way), reading a specific response header (like a rate-limit header telling you how many requests remain), or fetching a non-JSON body such as an HTML page to scrape or a file to download - none of which Invoke-RestMethod's automatic JSON parsing would handle or even expose cleanly. WHY THIS WORKS AS AN ANSWER ------------------------------ It correctly explains that Invoke-RestMethod auto-parses JSON into objects while Invoke-WebRequest exposes the full raw response, and gives a concrete, specific scenario (needing status code, headers, or non-JSON content) where Invoke-WebRequest is genuinely required rather than just preferred.