Skip to content

Migration guide for Az.Resources breaking changes#29227

Open
Celinadhh wants to merge 3 commits intoAzure:mainfrom
Celinadhh:zhaocelina/migrationGUide
Open

Migration guide for Az.Resources breaking changes#29227
Celinadhh wants to merge 3 commits intoAzure:mainfrom
Celinadhh:zhaocelina/migrationGUide

Conversation

@Celinadhh
Copy link
Member

Description

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

Celinadhh and others added 3 commits March 2, 2026 11:45
Co-authored-by: Celina Zhao <zhaocelina@microsoft.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 2, 2026 22:06
@azure-client-tools-bot-prd
Copy link

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

@isra-fel
Copy link
Member

isra-fel commented Mar 2, 2026

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@Celinadhh Celinadhh marked this pull request as ready for review March 2, 2026 22:10
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

Adds an Az 16.0.0 migration guide entry focused on Az.Resources policy cmdlets, documenting how scripts should be updated for the breaking removal of the legacy -BackwardCompatible behavior and .Properties.* access patterns.

Changes:

  • Introduces a new Az.16.0.0 migration guide document for Az.Resources policy cmdlets.
  • Documents before/after script updates for flattened output property access and Remove-* return behavior (-PassThru).

Comment on lines +109 to +117
$policyExemption = Get-AzPolicyAssignment -Name MyAssignment | New-AzPolicyExemption -Name MyExemption -ExemptionCategory Mitigated -BackwardCompatible
$policyDefinitionId = $policyExemption.Properties.PolicyAssignmentId
```

#### After
```powershell
$policyExemption = Get-AzPolicyAssignment -Name MyAssignment | New-AzPolicyExemption -Name MyExemption -ExemptionCategory Mitigated
$policyDefinitionId = $policyExemption.PolicyAssignmentId
```
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

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

In the New-AzPolicyExemption example, the variable name $policyDefinitionId doesn’t match the value being read (PolicyAssignmentId / .Properties.PolicyAssignmentId). This looks like a copy/paste mistake and could confuse readers—rename the variable to reflect that it’s the assignment id (or change the property if the intent was to show a definition id).

Copilot uses AI. Check for mistakes.
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.

4 participants