title: How to properly format PSObject to pass to PUT method for InvokeRest Method
body: <p>Below is the key value pairs I need to pass to the API. Dont know where Im going wrong</p>
  <pre><code>$Body = @{
      
      hostName            = 'null'
      hostOperatingSystem = 0
      optionalFilter1     = 'null'
      optionalFilter2     = 'null'
      description         = 'null'
      serviceName         = &quot;ServiceManager.Logging&quot;
      sectionName         = &quot;Services&quot;
      signature           = 'null'
      value               = @( @{
              Services = @( @{
                                
                      FullPath      = &quot;..\Service\MicroService.exe&quot;
                      InstanceCount = 2
                  })
                              
                            
          })
  } | ConvertTo-Json -Depth 4
  
  
    $Response = Invoke-RestMethod -Uri $URI -Method PUT -Headers $Headers -Body $Body -ContentType 'application/json'
  </code></pre>
  <p>Below is the error I am getting</p>
  <pre><code>Invoke-RestMethod : {&quot;&quot;:[&quot;JsonToken EndArray is not valid for closing JsonType Object. Path '', line 14, position 15.&quot;],&quot;value&quot;:[&quot;Unexpected character encountered while parsing value: [. Path 'value', line 5, position 15.&quot;]}
  </code></pre>