Hier ist ein Powershell Script, du musst nur die entsprechenden Variablen und Parameter nach deinen Bedürfnissen anpassen.
$FilePath = "c:\image.jpg"
$boundary = [System.Guid]::NewGuid().ToString()
$TheFile = [System.IO.File]::ReadAllBytes($FilePath)
$TheFileContent = [System.Text.Encoding]::GetEncoding('iso-8859-1').GetString($TheFile)
$LF = "`r`n"
$bodyLines = (
"--$boundary",
"Content-Disposition: form-data; name=`"Description`"$LF",
"This is a text field",
"--$boundary",
"Content-Disposition: form-data; name=`"fileToUpload`"; filename=`"image.jpg`"",
"Content-Type: image/jpeg$LF",
$TheFileContent,
"--$boundary--$LF"
) -join $LF
Invoke-RestMethod "http://localhost/index.php" -Method POST -ContentType "multipart/form-data; boundary=`"$boundary`"" -Body $bodyLines