Created
February 22, 2019 04:25
-
-
Save jlattimer/cab152360b314308979a44f4af6716cc to your computer and use it in GitHub Desktop.
Retrieves a package from a NuGet provider and lists different metadata #blog
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
#Install-PackageProvider Nuget -Force -verbose | |
#Register-PackageSource -Name nuget.org -Location https://www.nuget.org/api/v2 -ProviderName NuGet | |
#Register-PackageSource -Name chocolatey.org -Location https://chocolatey.org/api/v2 -ProviderName NuGet | |
$PackageName = "Microsoft.CrmSdk.XrmTooling.PackageDeployment.Wpf" | |
$packages = Find-Package -Name $PackageName -ProviderName NuGet -Source "nuget.org" | |
Write-Host "Version :"$packages[0].Version | |
foreach($key in $packages[0].Links) { | |
Write-Host $key.Relationship":"$key.HRef | |
} | |
For($i = 0; $i -le $packages[0].Metadata.Keys.Count; $i++) { | |
Write-Host $packages[0].Metadata.Keys[$i]":"$packages[0].Metadata.Values[$i] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment