< Back

Move-MyGetNuGetPackages

Sat Jan 11, 2020 10:09 am

NAME Move-MyGetNuGetPackages



SYNOPSIS

Migrate NuGet Packages From MyGet to Azure DevOps





SYNTAX

Move-MyGetNuGetPackages [-SourceIndexUrl] <String> [-DestinationIndexUrl] <String> [-DestinationPAT] <String>

[[-TempFilePath] <String>] [[-SourceUsername] <String>] [[-SourcePassword] <SecureString>] [[-DestinationFeedName]

<String>] [[-NumVersions] <Int32>] [<CommonParameters>]





DESCRIPTION

This function copies all NuGet packages from a MyGet.org public feed

to an Azure DevOps project feed. This requires a password from your

Azure DevOps organization. Passowrd can be in the form of a PAT (Personal Access Token)





PARAMETERS

-SourceIndexUrl <String>

The Index URL from your MyGet Package feed.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-DestinationIndexUrl <String>

The Index URL of your Azure DevOps feed.



Required? true

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-DestinationPAT <String>

Azure DevOps Personal Access Token (PAT) string



Required? true

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



-TempFilePath <String>

A file path where a .nupkg will be created during migration.

This is automatically cleaned up.



Required? false

Position? 4

Default value $env:Temp

Accept pipeline input? false

Accept wildcard characters? false



-SourceUsername <String>

The username of your Source pacakgeing provider



Required? false

Position? 5

Default value

Accept pipeline input? false

Accept wildcard characters? false



-SourcePassword <SecureString>

A string password to your package source. Password is encrypted before

being used in any webrequests.



Required? false

Position? 6

Default value

Accept pipeline input? false

Accept wildcard characters? false



-DestinationFeedName <String>



Required? false

Position? 7

Default value

Accept pipeline input? false

Accept wildcard characters? false



-NumVersions <Int32>

Max number of versions to migrate



Required? false

Position? 8

Default value -1

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



NOTES





For more information on Personal Access Tokens -

https://docs.microsoft.com/azure/devops ... thenticate



-------------------------- EXAMPLE 1 --------------------------



PS C:\\># Create a Hashtable to splat to your 'Move-MyGetNuGetPackages'



$params = @{

SourceIndexUrl = 'https://www.myget.org/F/mytestfeed/api/v3/index.json'

DestinationIndexUrl = 'https://pkgs.dev.azure.com/mytestorg/_p ... index.json'

DestinationPassword = 'thisisafakepassword'

TempFilePath = 'C:/Temp/'

FeedName = 'mynewtestfeed'

}



Move-MyGetNuGetPackages @params











RELATED LINKS