About This Page
This page is part of the Azure documentation. It contains code examples and configuration instructions for working with Azure services.
Bias Analysis
Bias Types:
⚠️
powershell_heavy
⚠️
windows_first
⚠️
windows_tools
Summary:
The documentation page demonstrates a Windows bias by providing detailed PowerShell examples before CLI examples, using Windows-specific tools and patterns (such as PowerShell cmdlets and Windows time zone handling), and offering more comprehensive step-by-step guidance for PowerShell users. Linux-specific considerations, shell examples, or parity in depth of CLI instructions are missing.
Recommendations:
- Provide equivalent Bash (Linux shell) examples alongside PowerShell for all command-line operations, especially for scripting and automation scenarios.
- Ensure CLI (az) examples are as detailed as PowerShell, including parameter explanations and sample JSON payloads for policy creation.
- Include notes or sections addressing any OS-specific prerequisites or differences, such as file path formats, environment variables, or scheduling nuances.
- If screenshots or UI steps are OS-agnostic, clarify this; otherwise, provide Linux desktop screenshots where appropriate.
- Explicitly mention that both Windows and Linux VMs are supported, and highlight any differences in backup behavior or requirements.
- Add troubleshooting tips or links specific to Linux VM backup scenarios.
Create pull request
Flagged Code Snippets
Get-AzRecoveryServicesBackupRetentionPolicyObject -WorkloadType AzureVM -ScheduleRunFrequency "Hourly"
$SchPol = Get-AzRecoveryServicesBackupSchedulePolicyObject -PolicySubType "Enhanced" -WorkloadType "AzureVM" -ScheduleRunFrequency “Hourly”
$schedulePolicy = Get-AzRecoveryServicesBackupSchedulePolicyObject -WorkloadType AzureVM -BackupManagementType AzureVM -PolicySubType Enhanced -ScheduleRunFrequency Hourly
$timeZone = Get-TimeZone -ListAvailable | Where-Object { $_.Id -match "India" }
$schedulePolicy.ScheduleRunTimeZone = $timeZone.Id
$windowStartTime = (Get-Date -Date "2022-04-14T08:00:00.00+00:00").ToUniversalTime()
$schPol.HourlySchedule.WindowStartTime = $windowStartTime
$schedulePolicy.HourlySchedule.ScheduleInterval = 4
$schedulePolicy.HourlySchedule.ScheduleWindowDuration = 23
$RetPol.DailySchedule.DurationCountInDays = 365
AzRecoveryServicesBackupProtectionPolicy
New-AzRecoveryServicesBackupProtectionPolicy -Name "NewPolicy" -WorkloadType AzureVM -RetentionPolicy $RetPol -SchedulePolicy $SchPol
$bkpPol = Get-AzRecoveryServicesBackupProtectionPolicy -Name "NewPolicy"
$bkpPol.SnapshotRetentionInDays=10
Set-AzRecoveryServicesBackupProtectionPolicy -policy $bkpPol -VaultId <VaultId>
Get-AzRecoveryServicesBackupProtectionPolicy -PolicySubType "Enhanced"
$targetVault = Get-AzRecoveryServicesVault -ResourceGroupName "Contoso-docs-rg" -Name "testvault"
$pol = Get-AzRecoveryServicesBackupProtectionPolicy -Name "NewPolicy" -VaultId $targetVault.ID
Enable-AzRecoveryServicesBackupProtection -Policy $pol -Name "V2VM" -ResourceGroupName "RGName1" -VaultId $targetVault.ID