title: Run PowerShell command (with pipeline) in CMD
body: <p>When we run the following command in PowerShell:</p>
  
  <pre><code>get-date | sc C:\temp\date.log
  </code></pre>
  
  <p>it creates date.log file with current date.</p>
  
  <p>But if we run the same via CMD:</p>
  
  <pre><code>powershell get-date | sc C:\temp\date.log
  </code></pre>
  
  <p>It complains:</p>
  
  <blockquote>
    <p>ERROR:  Unrecognized command</p>
  
  <pre><code>DESCRIPTION:
          SC is a command line program used for communicating with the
          Service Control Manager and services.
  USAGE:
          sc &lt;server&gt; [command] [service name] &lt;option1&gt; &lt;option2&gt;...
  </code></pre>
  </blockquote>
  
  <p>Apparently, CMD confuses pipeline meant for POSH, with its own.</p>
  
  <p>Can anyone point me how to make it run via CMD?</p>
  
  <p>Thanks in anticipation.</p>