Created
November 4, 2018 17:20
-
-
Save vmiheer/37833f6cce62a648d7a29a6cb20beec9 to your computer and use it in GitHub Desktop.
Get spotify to foreground
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://blogs.technet.microsoft.com/heyscriptingguy/2007/02/03/hey-scripting-guy-how-can-i-use-windows-powershell-to-get-a-list-of-all-the-open-windows-on-a-computer/ | |
# https://stackoverflow.com/questions/4993926/maximize-window-and-bring-it-in-front-with-powershell | |
# Needs Powershell community extentions | |
Set-ForegroundWindow (get-process Spotify | Where-Object {$_.MainWindowTitle -ne ""}).MainWindowHandle |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment