Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 7, 2026

Addresses review feedback to extract hardcoded Active Directory port list to a named constant.

Changes

  • Added $AD_WELL_KNOWN_PORTS constant at function scope containing AD well-known ports
  • Updated Test-IsAdWellKnownPort to reference the constant instead of inline array

Before:

function Test-IsAdWellKnownPort {
    param([string]$Port)
    $valid = @('53','88','135','389','445','464','636','3268','3269')
    return ($valid -contains $Port)
}

After:

$AD_WELL_KNOWN_PORTS = @('53','88','135','389','445','464','636','3268','3269')

function Test-IsAdWellKnownPort {
    param([string]$Port)
    return ($AD_WELL_KNOWN_PORTS -contains $Port)
}

Makes future updates to the AD port list more maintainable.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] WIP address feedback on Entra Private Access Application segments PR Extract hardcoded AD ports to constant for maintainability Jan 7, 2026
Copilot AI requested a review from aahmed-spec January 7, 2026 12:07
@aahmed-spec aahmed-spec marked this pull request as ready for review January 7, 2026 12:11
@aahmed-spec aahmed-spec merged commit 4bdf259 into test-25395 Jan 7, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants