title: Why a PowerShell command in a host is not returning the same thing as in the PowerShell console?
body: <p>I am developing a Windows user management utility in VB.Net Winforms hosting PowerShell. I successfully execute the required command to set the executionpolicy for the process, the problem arises when I try and execute "Get-LocalUser" with no parameters. In the PowerShell Console on my Windows 10 Anniversary Update machine it returns the Builtin Administrator Account, Guest and my personal account. Under my application I get no objects returned from Invoke(), no errors or  warnings either. What can I try to figure this issue out?</p>
  
  <p>My code is:</p>
  
  <pre><code>ps.AddCommand("Get-LocalUser")
  For Each user As PSObject In ps.Invoke()
      MainListView.Items.Add(user.Properties("Name").ToString)
  Next
  </code></pre>