Send a „Cancel current Operation“ to IBM Notes with Powershell

On new Notebooks or Tablets, one key is missing:

– the pause-key

To cancel the current Operation within Notes, you can send a key-combination to the Notes-Process.

I realized this with the following Powershell-Script:

add-type -AssemblyName microsoft.VisualBasic
add-type -AssemblyName System.Windows.Forms

$id = (Get-Process "notes2").Id
[Microsoft.VisualBasic.Interaction]::AppActivate($id)
[System.Windows.Forms.SendKeys]::SendWait(“{BREAK}”)