title: Restart docker Windows 10 command line
body: <p>I am trying to figure out how to restart docker in the command line so that i can make a bat script to restart it and start up a few containers.   </p>
  
  <p>I created a dos prompt using admin access and run the following</p>
  
  <pre><code>PS C:\Windows\system32&gt; net stop com.docker.service
  The Docker for Windows Service service is stopping.
  A system error has occurred.
  
  System error 1067 has occurred.
  
  The process terminated unexpectedly.
  
  The Docker for Windows Service service was stopped successfully.
  
  PS C:\Windows\system32&gt; net start com.docker.service
  The Docker for Windows Service service is starting.
  The Docker for Windows Service service was started successfully.
  
  PS C:\Windows\system32&gt; docker ps
  error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.25/containers/json: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error ma
  y also indicate that the docker daemon is not running.
  PS C:\Windows\system32&gt;
  </code></pre>
  
  <p>Note: i can restart it fine using the docker windows app.  However I need to do this comandline.</p>
  
  <p>Background for anyone wondering why i am restarting docker <a href="https://github.com/docker/for-win/issues/1038" rel="noreferrer">Docker won't start containers after win 10 shutdown and power up.</a>.  I am sick to death of doing this every time i reboot so was hoping to create a bat file i could just kick off.</p>