Add-Type -AssemblyName System.Windows.Forms Add-Type @" using System; using System.Runtime.InteropServices; public class WindowInterop { [DllImport("User32.dll")] public extern static bool MoveWindow(IntPtr handle, int x, int y, int width, int height, bool redraw); } "@ $stream1 = "http://stream.pulsradio.com:5000" $stream2 = "http://stream.pulsradio.com:5000" # Temporisation pour que windows finisse de charger, si besoin enlever # en début de ligne suivante #Start-Sleep -Seconds 30 #lance premier vlc $vlc1 = Start-Process -FilePath "VLC.EXE" -WorkingDirectory "C:\Program Files\VideoLAN\VLC\" -ArgumentList $stream1 -PassThru #temporisation pour qu'il ait le temps de se lancer correctement (temps a adapter, mieux vaut trop que pas assez) Start-Sleep -Seconds 10 #Deplace premier vlc en x= 10 y= 10 avec comme largeur 1600 et hauteur 800 [WindowInterop]::MoveWindow($vlc1.MainWindowHandle, 1960, 10, 1600, 800,$True) Start-Sleep -Seconds 1 #Pour mettre les VLC en plein ecran [System.Windows.Forms.SendKeys]::SendWait("{F11}") #[System.Windows.Forms.SendKeys]::SendWait("^H") Start-Sleep -Seconds 1 #lance deuxieme vlc $vlc2 = Start-Process -FilePath "VLC.EXE" -WorkingDirectory "C:\Program Files\VideoLAN\VLC\" -ArgumentList $stream2 -PassThru Start-Sleep -Seconds 10 #Deplace deuxieme vlc en x= 1950 (=sur deuxieme ecran en full hd sur le premier) y= 10 avec comme largeur 1600 et hauteur 800 [WindowInterop]::MoveWindow($vlc2.MainWindowHandle, 10, 10, 1600, 800,$True) Start-Sleep -Seconds 1 [System.Windows.Forms.SendKeys]::SendWait("{F11}") #[System.Windows.Forms.SendKeys]::SendWait("^H")