You have an Azure virtual machine named VM1 in the East US region. You need to configure Azure Backup for VM1 to store backups in a Recovery Services vault and immediately perform the initial backup. You plan to automate the setup using Azure PowerShell. Which sequence of Azure PowerShell cmdlets should you execute?
- 1Run `New-AzRecoveryServicesVault` to create the Recovery Services vault.
- 2Run `Set-AzRecoveryServicesVaultContext` to set the active vault context.
- 3Run `Enable-AzRecoveryServicesBackupProtection` to associate the virtual machine with a backup policy.
- 4Run `Backup-AzRecoveryServicesBackupItem` to trigger the initial backup.
Cevap
To configure and run the initial backup using Azure PowerShell, you must first run `New-AzRecoveryServicesVault` to create the vault. Next, run `Set-AzRecoveryServicesVaultContext` to set the vault as the active context for your session. Then, run `Enable-AzRecoveryServicesBackupProtection` to register the virtual machine and assign a backup policy. Finally, execute `Backup-AzRecoveryServicesBackupItem` to run the initial backup immediately.
The correct order establishes the prerequisite storage resource, points the session to the target resource, configures policy protection rules for the virtual machine, and then executes the backup job.
Adım Adım Çözüm
Anahtar Kavram
Configuring Azure Virtual Machine backups using Azure PowerShell cmdlets.
Tahmini Süre:2m 0s