Skip to content

Conversation

@prateekprshr-nith
Copy link
Member

Description

This PR adds changes for supporting custom Azure Environments that customers might have added using Add-AzEnvironment

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • Update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

Copilot AI review requested due to automatic review settings January 16, 2026 12:42
@azure-client-tools-bot-prd
Copy link

Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for custom Azure Environments that customers might have configured using Add-AzEnvironment. The changes enable Stack HCI registration to work with non-standard Azure cloud environments beyond the built-in ones (Azure Public Cloud, China Cloud, US Government Cloud, German Cloud, etc.).

Changes:

  • Added fallback logic to query custom Azure Environments using Get-AzEnvironment when the environment name doesn't match built-in clouds
  • Updated four helper functions to retrieve environment-specific endpoints from custom Azure Environments
  • Added a default billing service API scope constant for custom environments
  • Updated ChangeLog.md with the new capability

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.

File Description
src/StackHCI/StackHCI/ChangeLog.md Added changelog entry describing custom Azure Environment support
src/StackHCI/StackHCI.Autorest/custom/stackhci.ps1 Added custom environment support to Get-ManagementUrl, Get-PortalDomain, Get-EnvironmentEndpoints functions and registerArcScript; defined default billing API scope constant

@isra-fel
Copy link
Member

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

Copilot AI review requested due to automatic review settings January 19, 2026 08:58
@prateekprshr-nith
Copy link
Member Author

/azp run

@azure-pipelines
Copy link
Contributor

Commenter does not have sufficient privileges for PR 29067 in repo Azure/azure-powershell

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

@prateekprshr-nith
Copy link
Member Author

@isra-fel , I am all good to merge this PR from my side. Let me know if you have any questions. If not, please go ahead and merge this.

Copy link
Contributor

@vidai-msft vidai-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get-AzEnvironment -Name $EnvironmentName is called multiple times. The result can be saved into a local variable to avoid overhead.

@vidai-msft
Copy link
Contributor

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

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.

3 participants