Son aktivite 1735985299

Revizyon c13cc3f1fea4165c515ef09cd2e87f572f7eabf5

Unlist.ps1 Ham
1function Remove-AllNuGetPackageVersions($PackageId, $ApiKey)
2{
3 $lower = $PackageId.ToLowerInvariant();
4
5 $json = Invoke-WebRequest -Uri "https://api.nuget.org/v3-flatcontainer/$lower/index.json" | ConvertFrom-Json
6
7 foreach($version in $json.versions)
8 {
9 Write-Host "Unlisting $PackageId, Ver $version"
10 Invoke-Expression "dotnet nuget delete $PackageId $version --non-interactive --api-key $ApiKey --source https://api.nuget.org/v3/index.json"
11 }
12}
13
14Remove-AllNuGetPackageVersions -PackageId "MoongladePure.Web" -ApiKey "YOUR_KEY"