Skip to content

Instantly share code, notes, and snippets.

@EricRohlfs
Created September 20, 2016 16:42
Show Gist options
  • Save EricRohlfs/4fd3c69c80a41abf864576c5ca5d87bd to your computer and use it in GitHub Desktop.
Save EricRohlfs/4fd3c69c80a41abf864576c5ca5d87bd to your computer and use it in GitHub Desktop.
# PowerShell script to publish all the nuget packages in a project to VSTS Package server
$Dir = get-childitem D:\_delete\blah\WebApplication4 -recurse
# $Dir |get-member
$List = $Dir | where {$_.extension -eq ".nupkg"}
$List | format-table name
$List | ForEach-Object{
$tempPath = Join-Path $_.Directory $_.name
D:\nuget.exe push -Source "MyNugetServerNameOrUrl" -ApiKey VSTS $tempPath
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment