Skip to main content
Version: 2.2.0

Test-AzdoOrganizationAutomaticEnrollmentCodeSecurityNewRepository

SYNOPSIS

Returns a boolean depending on the configuration.

SYNTAX

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

DESCRIPTION

Checks if the GitHub Code Security plan is automatically enabled on newly created Git repositories.

GitHub Advanced Security for Azure DevOps is sold either as a single bundled plan or as two separate plans, GitHub Secret Protection and GitHub Code Security. The per-plan automatic enablement settings are only returned by api-version 7.2-preview.3 of the Advanced Security org enablement API. Get-ADOPSOrganizationAdvancedSecurity pins api-version 7.2-preview.1, which only returns the bundled 'enableOnCreate' value, so this test calls the endpoint directly.

Organizations still on the bundled SKU are skipped, since the bundled equivalent is covered by AZDO.1026.

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-AzdoOrganizationAutomaticEnrollmentCodeSecurityNewRepository

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-AzdoOrganizationAutomaticEnrollmentCodeSecurityNewRepository