title: How to output json object returned from REST api in powershell?
body: <p>I am trying to output to console a json object that is being returned when I call the URL:</p>
  
  <pre><code>http://localhost:999/api/randomObjects/19
  </code></pre>
  
  <p>where randomObjects is the type of object and 19 is the object ID. So far, the only way I have gotten the json to output to the console in powershell is using webclient and saving the json to a folder then outputting it.</p>
  
  <pre><code>$storageDir = "C:\Path\to\folder"
  $webclient = New-Object System.Net.WebClient
  $url = "http://localhost:999/api/randomObjects/19"
  $file = "$storageDir/demofile.json"
  $webclient.DownloadFile($url,$file)
  cat $file
  </code></pre>
  
  <p>Is there a way to directly output the json object to console without saving it in a file?</p>