Kevnz
11/28/2013 - 8:42 PM

Powershell functions to be used with ConEmu. The tab function opens a new tab at the current location. Pane opens up another console window

Powershell functions to be used with ConEmu. The tab function opens a new tab at the current location. Pane opens up another console window in the same tab taking up half the screen. Finally dual-panes calls the pane function twice so you have three command prompts in the window, the first taking 50% of window, then the other two take up 25% each. You can then load this into your Powershell profile. More info on launching a console windows in ConEmu is available from the https://code.google.com/p/conemu-maximus5/wiki/NewConsole

function tab
{
    $path = Get-Location
    $end = "-new_console:d:" + $path.Path
    & "C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe" $end
}

function pane
{
    $path = Get-Location
    $end = "-new_console:s:d:" + $path.Path
    & "C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe" $end
}
function dual-panes
{
    pane
    pane
}

set-alias duo dual-panes