@Nathan Given per your screen shot, the policies have to be created separately and passed as -RetentionPolicy
and -SchedulePolicy
parameters. See Back up Azure VMs with Enhanced policy - Azure Backup | Microsoft Learn for details. Did you follow these steps and ran into an issue?
How can I script the creation of an Enhanced Azure Recovery Services backup policy for Virtual Machines?
I have over 70 backup recovery services vaults and I'm trying to mass create a new Enhanced Azure Virtual Machine Backup policy[1]. Doing this through Azure Portal works great, but is quite tedious.
We've looked into using powershell to script this out, but unfortunately New-AzRecoveryServicesBackupProtectionPolicy doesn't have a PolicyType parameter and everything I've tried seems to always create standard policies.
I'd like to use powershell for this mass creation of enhanced policies, however, if there is a way to do it in another, scripted manner, that'd be great to know.
Thank you,
Nathan
[1] This is the policy creation screen in Azure Portal that let's us create an enhanced policy.
2 answers
Sort by: Most helpful
-
Ryan Hill 28,631 Reputation points Microsoft Employee
2024-10-31T21:09:45.69+00:00 -
hossein jalilian 8,080 Reputation points
2024-10-31T19:45:46.3433333+00:00 Thanks for posting your question in the Microsoft Q&A forum.
You can use the
New-AzRecoveryServicesBackupProtectionPolicy
cmdlet with specific parameters to define an Enhanced policy.
Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful