You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
444 B
16 lines
444 B
Add-Type @"
|
|
using System;
|
|
using System.Runtime.InteropServices;
|
|
public class User32 {
|
|
[DllImport("user32.dll")]
|
|
[return: MarshalAs(UnmanagedType.Bool)]
|
|
public static extern bool SetForegroundWindow(IntPtr hWnd);
|
|
}
|
|
"@
|
|
|
|
$process = Get-Process | Where-Object { $_.MainWindowTitle -like "*Bezos Loves Slides*" }
|
|
Write-Host $process.MainWindowTitle
|
|
|
|
if ($process) {
|
|
[User32]::SetForegroundWindow($process.MainWindowHandle)
|
|
}
|
|
|