title: Extract all the users in all the local groups in windows server
body: <p>I have to find all the users in all the local groups via batch script and should redirect to an output file.</p>
  
  <p>I can extract for one group and redirect to a file.</p>
  
  <pre><code>net localgroup "Administrators" &gt; c:\temp.txt
  </code></pre>
  
  <p>But i have to get for the list of users for all the groups that is displayed for the below command.</p>
  
  <pre><code>net localgroup
  </code></pre>