Acess Alt + Tab with PowerShell ???

Hello, I want to be able to access Alt+tab data options from PowerShell. anyone every come across a way to do this?
I use alt+tab all the time but want to build a function that gets the programs in alt+tab assigns a row number then prompts for input and puts that app in front. I have built a lot of scripts that display an array to me then I key in a number to execute similar to invoke-history I want to be able easily jump to a word, excel or exchange NPP++ ect without having to tab many times ect. I just can’t fiond a way to get the alt+tab objects then a method to alt+tab to them?
any ideas?

They are just your open windows. I think you’d need to use pinvoke or similar to get the windows and then distinguish by their title or other properties.

I was able to use the following method: