Public/Install-FFTools.ps1

function Install-FFTools {

    #Download and unzip ffmpeg exes'
    Write-Host "Downloading the windows build of ffmpeg and unpacking in path: $env:SystemRoot\system32" -ForegroundColor Green
    $url = "https://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-4.1.4-win64-static.zip"
    $zipfile = "C:\Users\$env:username\Downloads\ffmpeg.zip"
    $outpath = "C:\Users\$env:username\Downloads\ffmpeg\"
    #[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::TLS12
    Invoke-WebRequest -Uri $url -OutFile $zipfile
    Invoke-Unzip $zipfile $outpath


    #Copy ffmpeg exes' into the system path for execution in powershell
    $FFMpegFiles = Get-ChildItem $outpath -recurse -Include *.exe
    Copy-Item $FFMpegFiles $env:SystemRoot\system32 -Verbose

    #Remove stage package
    Remove-Item $zipfile -force
    Remove-Item $outpath -force -Recurse
}