title: Start or Stop windows services using a bat file
body: <p>I need to start or stop around 5 windows services using a .bat file. I have been doing the below. But once i run this, i get an error- %x service not found.</p>
  
  <pre><code>for %%x in (
  "service 1"
  "service 2"
  "service 3"
  ) do net start | find %%x &gt; nul 2&gt;&amp;1 
  if not .%errorlevel%.==.0. net start %%x &gt;nul
  goto skip
  
  :skip
  pause 
  </code></pre>