Skip to content

Feature: Enable PowerShell for Instant Access Restore Point#29475

Merged
YanaXu merged 23 commits into
Azure:mainfrom
OMJayswal:copilot/az-compute-instant-access-restore-points
May 6, 2026
Merged

Feature: Enable PowerShell for Instant Access Restore Point#29475
YanaXu merged 23 commits into
Azure:mainfrom
OMJayswal:copilot/az-compute-instant-access-restore-points

Conversation

@OMJayswal
Copy link
Copy Markdown
Contributor

@OMJayswal OMJayswal commented Apr 28, 2026

Adds Instant Access (IA) parameters to existing Restore Point cmdlets, enabling rapid disk restoration from application-consistent snapshots on Premium SSD v2 and Ultra disks. Requires API version 2025-04-01+ and the AppConsistentInstantAccessSnapshotForDirectDriveDisks feature flag.

Changes

New parameters

  • New-AzRestorePointCollection: -InstantAccess <bool?> — enables IA at the collection level
  • Update-AzRestorePointCollection: -InstantAccess <bool?> — toggles IA on an existing collection via PATCH
  • New-AzRestorePoint: -InstantAccessDurationInMinutes <int?> — IA snapshot retention duration (validated 1–300 min)

Output type additions

  • PSRestorePointCollection: InstantAccess (bool?) — mapped from RestorePointCollection.InstantAccess
  • PSRestorePoint: InstantAccessDurationInMinutes (int?) — custom AutoMapper mapping from SDK's InstantAccessDurationMinutes

Supporting changes

  • AutoMapper profile updated with explicit InstantAccessDurationMinutes → InstantAccessDurationInMinutes mapping
  • Help docs updated for all three cmdlets with new parameter docs and examples
  • Scenario test Test-RestorePointsInstantAccess added covering collection creation with IA, restore point with custom duration, output property verification, and IA toggle via Update

Usage

# Create collection with Instant Access enabled
New-AzRestorePointCollection -ResourceGroupName "rg" -Name "rpc" -VmId $vm.Id -Location "eastus2euap" -InstantAccess $true

# Create restore point with 120-min IA duration
New-AzRestorePoint -ResourceGroupName "rg" -RestorePointCollectionName "rpc" -Name "rp1" `
    -ConsistencyMode "ApplicationConsistent" -InstantAccessDurationInMinutes 120

# Disable IA on existing collection
Update-AzRestorePointCollection -ResourceGroupName "rg" -Name "rpc" -InstantAccess $false

All new parameters are optional; omitting them preserves existing behavior.

Copilot AI and others added 5 commits April 17, 2026 09:46
…w/Update-AzRestorePointCollection

Agent-Logs-Url: https://github.com/OMJayswal/azure-powershell/sessions/293138a6-53c0-42e4-b3cb-60d044135327

Co-authored-by: OMJayswal <146695766+OMJayswal@users.noreply.github.com>
- Update Test-RestorePointsInstantAccess to use eastus2euap (only region
  supporting InstantAccess), Win2019Datacenter image (Win2012R2Datacenter
  retired), and correct VM setup without policy-blocked configurations
- Create restore point collection with -InstantAccess \True
- Create restore point with -InstantAccessDurationInMinutes 120
- Remove assertions on InstantAccessDurationInMinutes since the Azure API
  accepts it on write but does not return it in GET responses
- Add session recording for playback

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 28, 2026 18:11
@azure-client-tools-bot-prd
Copy link
Copy Markdown

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

Copy link
Copy Markdown
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 PowerShell support for configuring Instant Access behavior on restore point collections and restore points in the Az.Compute module, including cmdlet parameters, output surface area updates, and scenario test coverage.

Changes:

  • Added -InstantAccess to New-AzRestorePointCollection and Update-AzRestorePointCollection.
  • Added -InstantAccessDurationInMinutes to New-AzRestorePoint and surfaced corresponding output properties via PS models and AutoMapper.
  • Updated help docs, changelog, and added a new scenario test for Instant Access.

Reviewed changes

Copilot reviewed 9 out of 13 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/Compute/Compute/help/Update-AzRestorePointCollection.md Documents new -InstantAccess parameter and example.
src/Compute/Compute/help/New-AzRestorePointCollection.md Documents new -InstantAccess parameter and example.
src/Compute/Compute/help/New-AzRestorePoint.md Documents new -InstantAccessDurationInMinutes parameter and example.
src/Compute/Compute/RestorePoints/UpdateAzRestorePointCollection.cs Adds InstantAccess parameter and passes it to RPC update.
src/Compute/Compute/RestorePoints/NewAzRestorePointCollection.cs Adds InstantAccess parameter and sets it on create.
src/Compute/Compute/RestorePoints/NewAzRestorePoint.cs Adds duration parameter with validation and sets SDK model field.
src/Compute/Compute/Generated/Models/PSRestorePointCollection.cs Adds InstantAccess property to output type.
src/Compute/Compute/Generated/Models/PSRestorePoint.cs Adds InstantAccessDurationInMinutes property to output type.
src/Compute/Compute/Generated/Models/ComputeAutoMapperProfile.cs Maps SDK InstantAccessDurationMinutes to PS InstantAccessDurationInMinutes.
src/Compute/Compute/ChangeLog.md Adds release notes entries for the new parameters/properties.
src/Compute/Compute.Test/ScenarioTests/RestorePointsTests.ps1 Adds new Test-RestorePointsInstantAccess scenario script.
src/Compute/Compute.Test/ScenarioTests/RestorePointsTests.cs Wires the new scenario script into xUnit.

Comment thread src/Compute/Compute/help/New-AzRestorePoint.md
Comment thread src/Compute/Compute.Test/ScenarioTests/RestorePointsTests.ps1
Comment thread src/Compute/Compute/ChangeLog.md Outdated
Comment thread src/Compute/Compute.Test/ScenarioTests/RestorePointsTests.cs Outdated
@VeryEarly
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
Copy Markdown
Member

@audreyttt audreyttt left a comment

Choose a reason for hiding this comment

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

Looks good to me with some small nits. Please look into the CI check failure logs and follow any remediation steps.

Comment thread src/Compute/Compute/help/New-AzRestorePoint.md
Comment thread src/Compute/Compute/ChangeLog.md Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 30, 2026 06:22
Copy link
Copy Markdown
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 9 out of 13 changed files in this pull request and generated 4 comments.

Comment thread src/Compute/Compute.Test/ScenarioTests/RestorePointsTests.ps1 Outdated
Comment thread src/Compute/Compute.Test/ScenarioTests/RestorePointsTests.cs
Comment thread src/Compute/Compute/help/New-AzRestorePointCollection.md
Comment thread src/Compute/Compute/Generated/Models/PSRestorePoint.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 30, 2026 06:34
Copy link
Copy Markdown
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 9 out of 13 changed files in this pull request and generated 3 comments.

Comment thread src/Compute/Compute/help/Update-AzRestorePointCollection.md Outdated
Comment thread src/Compute/Compute/ChangeLog.md Outdated
Comment thread src/Compute/Compute.Test/ScenarioTests/RestorePointsTests.ps1
@VeryEarly
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

mask characters of password with ***

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 5, 2026 01:31
Copy link
Copy Markdown
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 9 out of 13 changed files in this pull request and generated 6 comments.

Comment thread src/Compute/Compute.Test/ScenarioTests/RestorePointsTests.ps1 Outdated
Comment thread src/Compute/Compute.Test/ScenarioTests/RestorePointsTests.ps1
Comment thread src/Compute/Compute/help/Update-AzRestorePointCollection.md Outdated
Comment thread src/Compute/Compute/help/New-AzRestorePointCollection.md
Comment thread src/Compute/Compute/help/Update-AzRestorePointCollection.md Outdated
Comment thread src/Compute/Compute/ChangeLog.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 5, 2026 01:37
@VeryEarly
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
Copy Markdown
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 9 out of 13 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

src/Compute/Compute/help/New-AzRestorePoint.md:45

  • Example 2 does not specify -ConsistencyMode, but the example description claims it creates an application-consistent restore point, while the -ConsistencyMode parameter description below says only CrashConsistent is accepted as input. Please update the example description (or the parameter description) so the documented behavior is consistent.
### Example 2
```powershell
New-AzRestorePoint -ResourceGroupName "MyResourceGroup" -RestorePointCollectionName "MyRPCollection" -Name "MyRestorePoint" -InstantAccessDurationInMinutes 120

Creates a new application-consistent Restore Point with a 120-minute instant access snapshot duration.

PARAMETERS

-ConsistencyMode

ConsistencyMode of the restore point. Can be specified in the input while creating a restore point. For now, only CrashConsistent is accepted as a valid input. Please refer to https://aka.ms/RestorePoints for more details.

</details>

Comment thread src/Compute/Compute.Test/ScenarioTests/RestorePointsTests.ps1 Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 5, 2026 10:10
Copy link
Copy Markdown
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 9 out of 13 changed files in this pull request and generated 7 comments.

Comment thread src/Compute/Compute/RestorePoints/NewAzRestorePointCollection.cs
Comment thread src/Compute/Compute/RestorePoints/UpdateAzRestorePointCollection.cs
Comment thread src/Compute/Compute/help/New-AzRestorePointCollection.md
Comment thread src/Compute/Compute/help/Update-AzRestorePointCollection.md Outdated
Comment thread src/Compute/Compute/Generated/Models/PSRestorePointCollection.cs
Comment thread src/Compute/Compute/Generated/Models/PSRestorePoint.cs
Comment thread src/Compute/Compute/ChangeLog.md
@VeryEarly
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@haagha haagha requested a review from audreyttt May 5, 2026 14:30
haagha
haagha previously approved these changes May 5, 2026
audreyttt
audreyttt previously approved these changes May 5, 2026
Copy link
Copy Markdown
Member

@audreyttt audreyttt left a comment

Choose a reason for hiding this comment

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

Please also accept the CLA agreement following the instructions in the microsoft-github-policy-service comment, to resolve the CI check.

Comment thread src/Compute/Compute/help/New-AzRestorePoint.md Outdated
Comment thread src/Compute/Compute/help/Update-AzRestorePointCollection.md Outdated
Comment thread src/Compute/Compute/ChangeLog.md Outdated
Comment thread src/Compute/Compute/Generated/Models/PSRestorePoint.cs Outdated
@audreyttt audreyttt modified the milestone: Az 16.0.0 (06/02/2026) May 5, 2026
@OMJayswal OMJayswal dismissed stale reviews from audreyttt and haagha via d06f47f May 5, 2026 17:51
@audreyttt
Copy link
Copy Markdown
Member

/azp run

@azure-pipelines
Copy link
Copy Markdown
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@YanaXu YanaXu enabled auto-merge (squash) May 6, 2026 07:09
@YanaXu YanaXu disabled auto-merge May 6, 2026 07:12
@YanaXu YanaXu merged commit 3ade6e3 into Azure:main May 6, 2026
11 of 12 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.

7 participants