$wshell = New-Object -ComObject wscript.shell; $wshell.AppActivate('title of the application window') Sleep 1 $wshell.SendKeys('~')\ #Alternatively Add-Type -AssemblyName System.Windows.Forms [System.Windows.Forms.SendKeys]::SendWait('~');