title: How to extract/display any two columns and their values from command output?
body: <p>I need the TaskName and the Status columns displayed from <code>schtasks</code> command.</p>
  <p>I tried the following:</p>
  <pre><code>for /f &quot;tokens=1,3 delims= &quot; %i in ('schtasks') DO echo %i
  </code></pre>
  <p>The output is not pretty looking. Current output if I run <code>schtasks</code> :</p>
  <pre class="lang-none prettyprint-override"><code>C:\Windows\system32&gt;schtasks
  Folder: \Microsoft\Windows\WwanSvc
  TaskName                               Next Run Time          Status
  NotificationTask                         N/A                    Ready
  Folder: \Microsoft\XblGameSave
  TaskName                                 Next Run Time          Status
  XblGameSaveTask                          N/A                    Ready
  </code></pre>
  <p>Sample desired output:</p>
  <pre class="lang-none prettyprint-override"><code>Folder: \Microsoft\Windows\WwanSvc
  TaskName                                      Status
  NotificationTask                               Ready
  Folder: \Microsoft\XblGameSave
  TaskName                                       Status
  XblGameSaveTask                                Ready
  </code></pre>