Skip to content

New-Tab

Create a new tab in Windows Terminal

try {
	& wt.exe --window 0 new-tab
	if ($lastExitCode -ne 0) { throw "Executing wt.exe has failed with exit code $lastExitCode" }

	"? Created a new tab in Windows Terminal."
	exit 0 # success
} catch {
	"?? ERROR: $($Error[0]) (script line $($_.InvocationInfo.ScriptLineNumber))"
	exit 1
}

This script has no configurable parameters.

An interactive directory of PowerShell scripts.