does a CMD window stop running while Windows 10 lock screen is enabled?

Most programs running when the computer is locked will continue to run, including command shells, like the command prompt or Powershell. It is possible for the developer of an application to detect a locked computer and perform an action, like pausing or even closing the application. However, that is generally rare, especially for a console application, as they tend to be used for servers, services, and simply outputting information. A contrary example would be a single player game, which are often programmed to detect a computer being locked and then pause the game.


By default, command windows continue to run while the screen is locked.

To verify this, try the following:

  • Open a command prompt window (in case you don't know how, press the Windows key, type cmd, then press enter)
  • Type ping example.com into the command prompt and press Enter to run it
  • While the ping is happening, hold the Windows key and then press the L key (this is the keyboard shortcut to lock the screen in Windows 10)
  • Wait a few moments, then unlock your screen

You should see that the ping operation continued while the screen was locked. Voila!


ALL programs in the currently logged on session will continue to run when the session is locked.

As a server and database administrator that often has to deal with moving around 100,000+ client uploaded files with RoboCopy, I do this ALL the time. I also frequently leave programs like 7Zip, WinSCP and SQL Server Management Studio running scripts/processes while the session is locked.

The keyword here is Locked, NOT Logged Off. Logging off will close all programs running in the current session.