I am looking for a Powershell or C# script/app that can do the following.
Every day it is to run at a pre-set time, let's say 10pm.
If the day is Sunday then I want to delete/merge all checkpoints, then create new checkpoints for every VM, then zip and copy the zip of each VM hard disk to Microsoft Azure blob storage.
Any other day of the week besides Sunday I want checkpoints created, the previously existing checkpoints zipped/copied to Microsoft Azure, then the previously existing checkpoints deleted/merged into the primary hard disk.
Essentially what I am looking for is a script I can run nightly that checkpoints all my VM hard disks and uploads to Azure. On Sunday nights it should be a full backup and not incremental.