'Bring focus to a batch started browser window

I have a batch script that launches two Chrome windows. I want to focus the first one when it launches and then the second one.

"%PROGRAMFILES(x86)%\google\chrome\application\chrome.exe" --start-fullscreen --app=https://www.youtube.com/login

//focus this window

...

"%PROGRAMFILES(x86)%\google\chrome\application\chrome.exe" --start-fullscreen --https://www.youtube.com/feed/subscriptions

//focus this window

...

I want to be able to run this in a cmd context, so a powershell or batch script would be great.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source