Hi again!
I'm setting properties for feeds using
pgutil feeds properties set --api-key=$APIKey --source="$ServerUrl" `
--feed="$feedName" --property="$propertyName" --value="$propertyValue"
However only the last property that I set will retain the enabled setting.
This is with pgutil version 2.4.2 targeting ProGet version 2026.8
Here is the relevant snippet from my code (Not complete)
Function Set-FeedProperty{
param (
[Parameter(Mandatory=$true)][string]$feedName,
[Parameter(Mandatory=$true)][string]$propertyName,
[Parameter(Mandatory=$true)][string]$propertyValue
)
$output = pgutil feeds properties set `
--api-key=$APIKey `
--source="$ServerUrl" `
--feed="$feedName" `
--property="$propertyName" `
--value="$propertyValue" 2>&1
if($output -match "error"){
Write-Host "##[error] Property '$propertyName': $output"
} else {
Write-Debug "##[debug] Property '$propertyName': $output"
}
}
# Enable tracking package usage
Set-FeedProperty $feedName "packageStatisticsEnabled" $true
Set-FeedProperty $feedName "restrictPackageStatistics" $true
Set-FeedProperty $feedName "deploymentRecordsEnabled" $true
Set-FeedProperty $feedName "usageRecordsEnabled" $true
# Display vulnerability information and enforce vulnerability compliance rules
Set-FeedProperty $feedName "vulnerabilitiesEnabled" $true
# Display license information and enforce license compliance rules
Set-FeedProperty $feedName "licensesEnabled" $true
# Show package usage in Projects & Builds (SCA)
Set-FeedProperty $feedName "useWithProjects" $true
If I run it as is, only useWithProjects will be enabled

If I comment out the final command, licensesEnabled will be enabled instead.

If I try to manually set a single property from the CLI afterwards, instead only that property will be set to enabled, resetting the previously enabled property to disabled.
P.S Regarding my previous thread where we discussed the implementation of more settable properties, I apologize for any potential confusion caused by my last message. I had messed up the casing on the property names (Uppercase first letter instead of lowercase).
Best regards
Nils Nilsson







