Is it possible to use wscript.shell
to send an ALT+TAB ?
$wshell = New-Object -ComObject wscript.shell;
$wshell.SendKeys('\t')
I use System.Windows.Forms.SendKeys instead.
Add-Type -AssemblyName System.Windows.Forms
[System.Windows.Forms.SendKeys]::SendWait('%{TAB}')
Not sure why but wscript.shell doesnt't work with %{TAB}.