title: C# runs Powershell with Get-MpThreatDetection
body: <p>If you run the command "Get-MpThreatDetection" in the powershell console you get (if any threats was found in the past) 17 Attributes shown in the console. But now I try the same command on a c# app, I get only the DetectionID and the ThreatID. If I try the same thing with the "help" command, I get the exact same Output on both ways.
  But why?</p>
  
  <p>C# Code:</p>
  
  <pre><code> using (PowerShell PowerShellInstance = PowerShell.Create())
          {
              PowerShellInstance.AddScript("Get-MpThreatDetection");
              Collection&lt;PSObject&gt; result = PowerShellInstance.Invoke();
  
              foreach (PSObject r in result)
              {
                  PSResult.Add(r.BaseObject.ToString());
              }
          }
  </code></pre>
  
  <p>(If you want to make a test threat to get something back with this command, save a Textfile with the Code in <a href="http://www.eicar.org/86-0-Intended-use.html" rel="nofollow noreferrer">this link</a>.)</p>
  
  <p>Output from Powershell:
  <a href="https://i.stack.imgur.com/bDhxO.png" rel="nofollow noreferrer">Powershell Output Image</a></p>
  
  <p>Output from the Code:</p>
  
  <blockquote>
    <p>MSFT_MpThreatDetection (DetectionID = "{E186D279-4BA0-4FA5-8CD2-84F2D053CA6D}", ThreatID = 2147519003)</p>
  </blockquote>