title: How to get result as json from schedule task
body: <p>I'm working on a PowerShell script which is calling C# method to enable/ disable a specific task.</p>
  <p>Everything is working fine But I only want to get the Json result. Instead I'm getting the below result, like TaskName , TaskPath and other unwanted white space .  I'm using <code>return $properties | ConvertTo-Json</code> in my PowerShell script to convert it but looks like when we do Enable-ScheduledTask PowerShell automatically added TaskPath and TaskName.</p>
  <p>Can anyone suggestion how I can avoid TaskName/TaskPath and get only Json data in {}.</p>
  <p><a href="https://i.stack.imgur.com/Nv5dz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Nv5dz.png" alt="enter image description here" /></a></p>