Код:

param(
$mozilla = "C:\Program Files\Mozilla Firefox\firefox.exe",
$PotPlayer = "C:\Program Files\PotPlayer\PotPlayerMini64.exe"
)cls
$SW=Add-Type -name sw -pas @"
[DllImport("user32.dll")]
public static extern bool
ShowWindowAsync(IntPtr hWnd,int cmdShow);
"@
start $mozilla
$pp=start $PotPlayer -win Minimized -PassThru
while($pp.MainWindowHandle -eq 0){sleep -m 1}
$SW::ShowWindowAsync($pp.MainWindowHandle, 7)