I use the following command to launch new ConEmu powershell consoles.
ConEmu64.exe /config "shell" /dir "c:\" /cmd powershell -new_console:n
I would like to pass an additional argument to specify a powershell script to run at startup of a new console. The following almost works but only prints the whole command and does not actually execute it:
ConEmu64.exe /config "shell" /dir "c:\" /cmd 'powershell -noexit -Command {Write-host "Hello world"}' -new_console:n
which produces:
Write-host Hello world
C:\>
while I am expecting:
Hello world
C:\>