Created
March 30, 2018 12:35
-
-
Save johnmmoss/f2ca7c1d562bef4b9609742005d2e8dc to your computer and use it in GitHub Desktop.
This file contains hidden or 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 TFS Package Management Source for Nuget | |
nuget.exe sources add -name Powershell -source http://url/to/package/repo/index.json -username VSTS -password "pat-from-tfs" -storePasswordInClearText | |
# Register the PowershellGet source | |
Register-PSRepository -Name Powershell -SourceLocation http://url/to/package/repo/index.json -PackageManagementProvider NuGet -PublishLocation http://url/to/package/repo/index.json -InstallationPolicy Trusted -Credential Get-Credential | |
# Finally we can push the loaded module to our TFS Repository | |
Publish-Module -Name Greetings -Repository Powershell -NuGetApiKey "pat-from-tfs" -Credential Get-Credential |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment