<h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: 10.0.18999.0
Windows Terminal version: 0.5.2762.0"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: 10.0.18999.0
Windows Terminal version: 0.5.2762.0
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<ol dir="auto">
<li>Open a new PowerShell tab. PowerShell version does not matter.</li>
<li>Paste and run the following code in the PowerShell tab:</li>
</ol>
<div class="highlight highlight-source-powershell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Register-EngineEvent -SourceIdentifier Powershell.Exiting -Action { Set-Content -Value &quot;Hello there.&quot; -Path &quot;$env:TEMP\General Kenobi.txt&quot; }"><pre class="notranslate"><span class="pl-c1">Register-EngineEvent</span> <span class="pl-k">-</span>SourceIdentifier Powershell.Exiting <span class="pl-k">-</span>Action { <span class="pl-c1">Set-Content</span> <span class="pl-k">-</span>Value <span class="pl-s"><span class="pl-pds">"</span>Hello there.<span class="pl-pds">"</span></span> <span class="pl-k">-</span>Path <span class="pl-s"><span class="pl-pds">"</span><span class="pl-smi">$<span class="pl-c1">env:</span>TEMP</span>\General Kenobi.txt<span class="pl-pds">"</span></span> }</pre></div>
<ol start="4" dir="auto">
<li>Close the PowerShell tab by clicking the x button or by the <code class="notranslate">exit</code> command. Or close the Terminal window.</li>
</ol>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/2971735/66866265-3a614a00-ef99-11e9-9dd1-d33e4fd371cb.png"><img src="https://user-images.githubusercontent.com/2971735/66866265-3a614a00-ef99-11e9-9dd1-d33e4fd371cb.png" alt="grafik" style="max-width: 100%;"></a></p>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">The PowerShell tab should trigger the Powershell.Exiting event and a file <code class="notranslate">%temp%\General Kenobi.txt</code> should be created.</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">The event does not trigger and no file is created.</p>
<p dir="auto">Note: If you reproduce this in the native PowerShell 5 or 7-preview.3 console (not the Terminal app) you'll find that the event triggers correctly only when using the <code class="notranslate">exit</code> command. Clicking the close button also does not trigger the event. Although I also reported that at <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="369256968" data-permission-text="Title is private" data-url="https://github.com/PowerShell/PowerShell/issues/8000" data-hovercard-type="issue" data-hovercard-url="/PowerShell/PowerShell/issues/8000/hovercard" href="https://github.com/PowerShell/PowerShell/issues/8000">PowerShell/PowerShell#8000</a>, I believe that with Terminal it's an independent issue.</p>
<h1 dir="auto">Description of the new feature/enhancement</h1>
<p dir="auto">Sometimes i need to open many panes in a tab with splitHorizontal/splitVertical hotkeys. And then broadcast input to all the panes in current tab, or all tabs.</p>
<p dir="auto">Is it possible to support broadcast input, like iterm2?</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/2578976/64075757-fa971980-ccee-11e9-9e44-47aaf3bca76c.png"><img src="https://user-images.githubusercontent.com/2578976/64075757-fa971980-ccee-11e9-9e44-47aaf3bca76c.png" alt="image" style="max-width: 100%;"></a></p>