Hi Alana,
I found the issue of the url provided from the former forum. It should be "nuget" instead of "feeds", as follows:
$url = "https://myprogetserver/nuget/mynuggets/package/mypackage/1.0.0"
The complete PowerShell is as follows:
$user = 'api'
$pass = 'abcdefg12345'
$pair = "$($user):$($pass)"
$encodedCreds = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes($pair))
$basicAuthValue = "Basic $encodedCreds"
$Headers = @{
Authorization = $basicAuthValue
}
$url = "https://myprogetserver/nuget/mynuggets/package/mypackage/1.0.0"
$destination = "c:\mypackages\mypackage-1.0.0.zip"
Invoke-WebRequest -Uri $url -OutFile $destination -Headers $Headers
Thanks,
Hashim