title: How can I use Powershell to access a restful webservice?
body: <p>I need to integrate an existing powershell script to update it's status via a restful web service that returns json. I'm a bit new to powershell but I was able to find the System.Net.WebRequest object do something like the following.</p>
  
  <pre><code>$a = [System.Net.WebRequest]::Create("http://intranet/service/object/")
  $a.Method = "GET"
  $a.GetResponse()
  </code></pre>
  
  <p>which returns a json array of objects</p>
  
  <pre><code>[ {id:1}, {id:2}] // etc
  </code></pre>
  
  <p>I'm not sure where to go from here and how to parse this into a native datatype. I'd like to be able to post and delete as well.</p>
  
  <p>Any pointers? And are there any json/rest libraries or command-lets?</p>