How do I execute a file upload via PowerShell?

This can be done using the following command:


Invoke-RestMethod -uri <complete URI to where the artifact will be in Artifactory>  -Method Put -InFile <path of file to upload> -Credential <PS creds> -ContentType “multipart/form-data”

 

For large files/performance issues users might want to also use the “-TimeoutSec <in seconds>” parameter.