title: How to create a raw body for POST request using PowerShell
body: <p>I am trying a POST request using PowerShell. It takes body of type raw. I know how to pass form-data using PowerShell, however not sure for rawdata type. For a simple raw-data in Postman e.g.</p>
  
  <pre><code>{
  "@type":"login",
   "username":"xxx@gmail.com",
   "password":"yyy"
  }
  </code></pre>
  
  <p>I pass below in PowerShell and it works fine.</p>
  
  <pre><code>$rawcreds = @{
                 '@type' = 'login'
                  username=$Username
                  password=$Password
               }
  
          $json = $rawcreds | ConvertTo-Json
  </code></pre>
  
  <p>However, for a complex rawdata like below, I am unsure how to pass in PowerShell.</p>
  
  <pre><code>{
      "@type": Sample_name_01",
      "agentId": "00000Y08000000000004",
      "parameters": [
          {
              "@type": "TaskParameter",
              "name": "$source$",
              "type": "EXTENDED_SOURCE"
          },
          {
              "@type": "TaskParameter",
              "name": "$target$",
              "type": "TARGET",
              "targetConnectionId": "00000Y0B000000000020",
              "targetObject": "sample_object"
          }
      ],
      "mappingId": "00000Y1700000000000A"
  }
  </code></pre>