Externes Kommando ausführen

$inputPath = "Pfad zu den Quelldateien"
$outputPath = "Pfad zu den Ausgabedateien"
$ffmpegPath =  "Pfad zur ffmpeg.exe"
 
$Files = Get-ChildItem -Path $inputPath
 
Foreach($File in $Files)
{
    $Command = $ffmpegPath + "\ffmpeg.exe -i `"" + $File.FullName + "`" `"" +  $outputPath + "\" + $File.Name + ".mp3`""
    $Command
    Invoke-Expression -Command $Command
}