1

I can't get the PowerShell started from a ConEmu console.

Trying to start with powershell.exe -NoProfile (works from cmd.exe). When I start it as a task I get:

ConEmuC: Root process was alive less than 10 sec, ExitCode=0.
Press Enter or Esc to close console...

Even if I start a cmd.exe console in ConEmu and execute powershell.exe -NoProfile nothing happens. Tried with cmd.exe /k powershell.exe -NoProfile. No way to get the PowerShell console. Any hints to debug this strange behaviour?

Ansgar Wiechers
  • 193,178
  • 25
  • 254
  • 328
Gert
  • 65
  • 8
  • Windows and ConEmu versions? – Maximus May 18 '18 at 07:30
  • `powershell.exe -NoProfile -NoExit`? – Ansgar Wiechers May 18 '18 at 07:33
  • -NoExit doesn't work – Gert May 18 '18 at 11:38
  • The problem is it does not work anymore _out of the blue_. Of course there is no 'out of the blue' with software. My laptop works from a different network location now. I added '-NoProfile' to exclude any effects of initialization. Worked so far for Win10 and ConEmu 180415 – Gert May 18 '18 at 11:46
  • There might be a connection to **WSL (Windows Subsystem for Linux)**. I installed this this on my laptop. Unfortunately, turning this feature of doesn't solve the issue. – Gert May 28 '18 at 16:50

1 Answers1

5

I was having this same problem at about the same time you did and I couldn't figure it out even after I upgraded to newer versions of CONEMU 180617. I also don't have Admin rights on my work computer and I really wanted my CONEMU setup back for Powershell. Well I finally got it working and I hope this will help you as well. I am able to run Powershell on my Windows 10 machine now!

Create a new task and then use this syntax:

powershell.exe -cur_console:c1:f:i:n

From the ConEmu Docs

  • cur_console[:switches]
    • c - force enable ‘Press Enter or Esc to close console’ confirmation
      • c0 - wait for Enter/Esc silently
      • c1 - don't close console automatically, even by Enter/Esc
    • f - force starting console active, useful when starting several consoles simultaneously
    • i - don't inject ConEmuHk into starting process
    • n - disable ‘Press Enter or Esc to close console’
Paul
  • 373
  • 1
  • 5
  • 12