This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#add source | |
nuget sources Add -Name "custom-feed" -Source "https://newhostednugetfeed.com/custom-feed/nuget/v3/index.json" -username | |
USERNAME -password PASSWORD | |
$files = Get-ChildItem C:\LocalNuGetTest\*.nupkg | |
ForEach ($file in $files) { | |
#echo $file.fullName | |
nuget push -Source "custom-feed" -ApiKey VSTS $file.fullName | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$destinationDirectory = "C:\LocalNuGetTest\" | |
$webClient = New-Object System.Net.WebClient | |
$webClient.Credentials = New-Object System.Net.NetworkCredential("USERNAME", "PASSWORD") | |
$feed =[xml]$webClient.DownloadString("https://hostednugetfeed.com/custom-feed/nuget/v2/Packages") | |
$records = $feed | select -ExpandProperty feed | select -ExpandProperty entry #| select -ExpandProperty content | |
for ($i=0; $i -lt $records.Length; $i++) { | |
$content = $records[$i] | select -ExpandProperty content | |
$properties = $records[$i] | select -ExpandProperty properties |