title: What's the best way to post data to Elastic Search using powershell?
body: <p>Should I use convert-tojson or roll my own. Should I use invoke-restrequest, invokeweb-request, System.net.WebClient or system.net.http.HttpClient? </p>
  
  <p>Sometimes I seem to post successfully, although the data isn't indexed.</p>
  
  <pre><code>{"_index":"dropstorage","_type":"connectionstats","_id":"97e156a5-4d16-48d4-84e8-fcc723aea1ae",
  "_version":1,"found":true,"_source":{
  "hnas":  1,
  "active":  70,
  "id":  "97e156a5-4d16-48d4-84e8-fcc723aea1ae",
  "total":  "70",
  "date":  "4/9/2015 9:03:36 AM"
  }}
  </code></pre>