#================================================= [code:1][/code:1] #Si powershell n'est pas en mode sta alors on relance le script en mode sta if($host.Runspace.ApartmentState -ne 'STA') { PowerShell -Sta -File ($myInvocation.MyCommand.Path) return } Add-Type –assemblyName PresentationFramework Add-Type –assemblyName PresentationCore Add-Type –assemblyName WindowsBase #Declaration du code XAML [xml]$xaml = @’