title: Why do powershell and python give different result for same command?
body: <p>Why do this script in Python</p>
  
  <pre><code>import subprocess, io
  p = subprocess.Popen(["powershell.exe", "Get-Process | Where-Object { $_.MainWindowTitle } |    Format-List Id,Name,Path"], stdout=subprocess.PIPE)
  for line in io.TextIOWrapper(p.stdout, encoding="utf-8"):
      line = " ".join(line.split())
      print(line)
  
  </code></pre>
  
  <p>and writing the command in Powershell</p>
  
  <pre><code>Get-Process | Where-Object { $_.MainWindowTitle } | Format-List Id,Name,Path
  </code></pre>
  
  <p>have different results?
  For example this is some of the result from Powershell:</p>
  
  <pre><code>Id   : 7692
  Name : NVIDIA Share
  Path : C:\Program Files\NVIDIA Corporation\NVIDIA GeForce Experience\NVIDIA Share.exe
  
  Id   : 7232
  Name : Origin
  Path : C:\Program Files (x86)\Origin\Origin.exe
  </code></pre>
  
  <p>And this is the same from Python:</p>
  
  <pre><code>Id   : 7692
  Name : NVIDIA Share
  Path :
  
  Id   : 7232
  Name : Origin
  Path : C:\Program Files (x86)\Origin\Origin.exe
  </code></pre>
  
  <p>Sometimes Path is missing from Python results when it is in Powershell. Why is that and is there some way to fix this?</p>