none
Powershell hangs? RRS feed

  • Question

  • Hello everyone, this is going to be one of those questions well i can't explain why it happens but i'm hoping someone here can explain any mitigation and if not at least explain why it happens. I've noticed the same problem on multiple OS/machines and powershell versions (all the way from 1 - 4). The powershell console will just hang and will require you to hit enter (or maybe something else) to get back to the prompt. I thought this was maybe because of some of the add-ins i use (i generally always install poshgit & chocolatey) but i've had it happen on a fresh install of windows without anything added to powershell. If anyone here is familiar with chocolatey with cup all (which updates everything) between the different update installs. I've also had this happen quite a few times after opening powershell for the first time after restarting the computer. Any ideas?
    Tuesday, January 14, 2014 6:00 PM

Answers

  • Hello,

    Mb this is cause:

    If you click left button in powershell console, then you select one console symbol (little white rectangle).

    Powershell pauses execution if something is selected. You should press Enter or Esc to continue execution.

    Good luck)


    • Edited by Kolomiets Sergei Tuesday, January 14, 2014 6:29 PM
    • Marked as answer by Ncage2 Tuesday, January 14, 2014 6:36 PM
    Tuesday, January 14, 2014 6:29 PM

All replies

  • Tuesday, January 14, 2014 6:06 PM
  • When does it hang?

    Jason maybe this question is unanswerable because i don't have enough info but generally like i've noticed the hangs either when i'm starting up powershell (after a clean reboot) or in the case of chocolatey between updates of different applications. Maybe it would be better for me to thoroughly document when it happens and take screen shots of the situation. I as i understand it powershell can sometimes take a long time to open because the initialization it has to do of .net objects but usually when this happens i'll let it site for at least 5 minutes before i attempt to do anything. 
    Tuesday, January 14, 2014 6:14 PM
  • 5 minutes seems excessive to me.

    Does it happen each time you open a PowerShell window? Just the first time after rebooting?


    Tuesday, January 14, 2014 6:18 PM
  • 5 minutes seems excessive to me.

    Does it happen each time you open a PowerShell window? Just the first time after rebooting?


    See thats the whole problem it happens randomly. Sometimes its ok other times it hangs. I've just learned when it happens hit <enter> on the keyboard and then everything will be ok :)
    Tuesday, January 14, 2014 6:20 PM
  • Hello,

    Mb this is cause:

    If you click left button in powershell console, then you select one console symbol (little white rectangle).

    Powershell pauses execution if something is selected. You should press Enter or Esc to continue execution.

    Good luck)


    • Edited by Kolomiets Sergei Tuesday, January 14, 2014 6:29 PM
    • Marked as answer by Ncage2 Tuesday, January 14, 2014 6:36 PM
    Tuesday, January 14, 2014 6:29 PM
  • Hello,

    Mb this is cause:

    If you click left button in powershell console, then you select one console symbol (little white rectangle).

    Powershell pauses execution if something is selected. You should press Enter or Esc to continue execution.

    Good luck)


    Oh my THIS IS IT :). I didn't think it was going to be so simple. I just tested it out and it does indeed pause the console (not sure why it does :) ). Any idea how to disable it? I guess its kind of hard sometimes to know that you accidentally even did it.
    Tuesday, January 14, 2014 6:35 PM
  • You can turn off QuickEdit from the Options tab in the Edit Options section.

    Don't retire TechNet! - (Don't give up yet - 12,575+ strong and growing)

    Tuesday, January 14, 2014 6:54 PM
    Moderator
  • This feature is useful for me because I often copy results from console. If I need activate powershell window, I use shortcut in task panel (there is preview in Windows 7) or click window border.
    Wednesday, January 15, 2014 11:01 AM
  • Oh my THIS IS IT :). I didn't think it was going to be so simple. I just tested it out and it does indeed pause the console (not sure why it does :) ). Any idea how to disable it? I guess its kind of hard sometimes to know that you accidentally even did it.

    When you've clicked something, your window title changes from (for example) "Windows PowerShell" to "Select Windows PowerShell".
    Wednesday, January 15, 2014 1:00 PM