Skip to main content
Version: 2.2.0

Test-AzdoOrganizationSecretProtectionEnrollment

SYNOPSIS

Returns a boolean depending on the configuration.

SYNTAX

Test-AzdoOrganizationSecretProtectionEnrollment [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

Checks if any existing Git repository in the organization is enrolled in the GitHub Secret Protection plan.

Automatic enablement only applies to newly created repositories, so an organization can have the auto enablement setting turned on while every existing repository remains unprotected. This test assesses actual coverage of the existing repositories, which AZDO.1039 deliberately does not.

Per plan enrolment is only returned by api-version 7.2-preview.3 of the Advanced Security org enablement API, so this test calls the endpoint directly instead of using Get-ADOPSOrganizationAdvancedSecurity.

Requires membership of the 'Project Collection Administrators' group or the 'Advanced Security: manage settings' permission set to Allow.

https://learn.microsoft.com/azure/devops/repos/security/configure-github-advanced-security-features?view=azure-devops#organization-level-onboarding

EXAMPLES

EXAMPLE 1

Test-AzdoOrganizationSecretProtectionEnrollment

Returns a boolean depending on the configuration.

PARAMETERS

-ProgressAction

Determines how PowerShell responds to progress updates generated by a script, cmdlet, or provider, such as the progress bars generated by Write-Progress.

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

System.Boolean

NOTES

https://maester.dev/docs/commands/Test-AzdoOrganizationSecretProtectionEnrollment