$sig = '[DllImport("user32.dll")] public static extern bool ShowWindowAsync(IntPtr hWnd, int nCmdShow);' Add-Type -MemberDefinition $sig -name NativeMethods -namespace Win32 Add-Type -AssemblyName microsoft.VisualBasic Add-Type -AssemblyName System.Windows.Forms $hwnd = @(Get-Process "TouchPlayer")[0].MainWindowHandle [Win32.NativeMethods]::ShowWindowAsync($hwnd, 9) [Microsoft.VisualBasic.Interaction]::AppActivate("TD_Main")