title: Translate curl commands into PowerShell
body: <p>Does anyone have experience with using the Websense API through PowerShell?  I need to translate the curl commands (which I have working) into Powershell so they can be scripted.  Anyone have any resources that would be useful?  Examples of curl commands that I need to translate are below:</p>
  
  <p><strong>Start a new transaction:</strong></p>
  
  <pre><code>curl -k -u &lt;username&gt;:&lt;password&gt; -X POST https://&lt;ps_ip_address&gt;:&lt;port&gt;/api/web/v1/categories/start
  </code></pre>
  
  <p><strong>Add an API-managed category (all data in the HTTPS request):</strong></p>
  
  <pre><code>curl -k -u &lt;username&gt;:&lt;password&gt; -X POST https://&lt;ps_ip_address&gt;:&lt;port&gt;/api/web/v1/categories -d "{\"Transaction ID\":\"&lt;transaction_ID_string&gt;\",\"Categories\": [ {\"Category Name\": \"&lt;name_string&gt;\",\"Category Description\":\"&lt;description_string&gt;\",\"Parent\": &lt;numeric_category_ID&gt;}]}"
  </code></pre>
  
  <p><strong>Add a URL (all data in the HTTPS request):</strong></p>
  
  <pre><code>curl -k -u &lt;username&gt;:&lt;password&gt; -X POST https://&lt;ps_ip_address&gt;:&lt;port&gt;/api/web/v1/categories/urls -d "{\"Transaction ID\": \"&lt;transaction_ID_string&gt;\",\"Category ID\": &lt;numeric_ID&gt;,\"URLs\":[\"https://www.new_url.com/\"]}" --cacert PolApiServer.crt
  </code></pre>
  
  <p><strong>Commit the transaction:</strong></p>
  
  <pre><code>curl -k -u &lt;username&gt;:&lt;password&gt; -X POST https://&lt;ps_ip_address&gt;:&lt;port&gt;/api/web/v1/categories/commit?TransactionID="&lt;id_string&gt;"
  </code></pre>