Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Within PowerShell 2.0 running in Windows XP, I execute the following command:


And get the following message:

Windows cannot end this program. It may need more time to complete an operation.

To return to Windows and check the status of the program, click Cancel.

If you choose to end the program immediately, you will lose any unsaved data. To end the program now, click End Now.

This happens whether I restart from PowerShell or from Windows itself. Any idea how I can restart a computer that will close a PowerShell console without prompt?

share|improve this question
up vote 8 down vote accepted

Use -Force to cause an immediate restart of the computer

share|improve this answer

One way is to use shutdown.exe with the -f parameter. Run shutdown /? from a cmd window for the full details.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.